#ruby-lang - Thu 22 Feb 2007 between 14:47 and 14:58



motion10 yo laptop and your still using it?
thats gotta be what, a P2
with 128M of ram
:p
blinkmotion: p3
96
wrs_blink, is there a way to get ri to help on keywords like "or" and "and"? I played around with it ("5 or 4 or 3 or 2 => 5") but didn't get it yet.
blinkwrs_: ri only does objects and methods.
wrs_: what are you trying to do?
wrs_Mh, and google removes "and"s and "or"s from search ...
motionwrs_: 5 isnt false so it uses that
oGMo96? why back in the day...
blink'and' and 'or' in gooogle
quote them.
wrs_blink: I try.
blinkcorundum: quickref?
corundumquickref is http://www.zenspider.com/Languages/Ruby/QuickRef.html
jastwrs_, the term short-circuit operator may be helpful to understand it
blinkwrs_: look at the quickref as well.
wrs_blink: I want to initialize a edge object by two nodes given and a connection modifier. Therefore, I think I need to make sure that the input params in fact are connection modifier + nodes.
blinki have no idea what you just said.
wrs_motion: sure, but I weren't sure whether or not it might be a binary or; but 4 or 1 makes 4, which confused me.
jastit's a logical or
blinkeverything is true but for false and nil
jastit picks the first term that, if interpreted as boolean, is true
wrs_blink, yes I know... apparently I just didn't realize it yet
blinkheh
jastif you want binary operators, you should use & and |
wrs_jast, no I want boolean ones
jastnever mind me then ;)
jtoy_does anyone have a a link to the Enumerable#group_by code, I am having trouble finding it online
blinkmrm.
dirt needs more carly pope.
wrs_blink, I meant, I have an object that needs several params for initialization. I want to make sure these are of the expected kind [of object].
blinkahhh
def meth foo; raise 'foo not a string' unless foo.is_a? String; do_stuff; end
wrs_blink, I'd leave it to any innermore method to throw any exceptions if the params of wrong type, but when I do so for initialization, and it crashes later, it might become hard to find out what caused the crash.
yes clearly, but for more but one param?
blink, therefore I am after the "and" thing.
blinkdef meth foo, bar; raise ArgumentError unless foo.is_a?(String) and bar.is_a?(Hash); do_stuff; end

Page: 3 10 17 24 31 38 45 52 59 66 73 

IrcArchive