7stud
(7stud --)
21
David A. Black wrote:
The ||= idiom should work
fine
..until it doesn't (I think you know what I'm refering to).
The hash default thing? I don't think that comes into play here, does
it?
No, but whenever I see ||= now, I get scared.
···
--
Posted via http://www.ruby-forum.com/\.
7stud -- wrote:
No, but whenever I see ||= now, I get scared.
I do to! It looks like a very angry gnome.
···
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
David A. Black wrote:
I'm still waiting to see a use-case for &&=. I've come close to
thinking I had one once or twice, but it always turns out I didn't.
Not terribly useful, but...
line = sock.gets
line &&= line.chomp
log.debug "line is #{line.inspect}"
···
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407