Created
August 6, 2009 20:33
-
-
Save subbuss/163551 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[subbu@earth ~] irb | |
irb(main):001:0> 1.to_ary | |
NoMethodError: undefined method `to_ary' for 1:Fixnum | |
from (irb):1 | |
irb(main):002:0> a,b,c=1; p a,b,c | |
1 | |
nil | |
nil | |
=> nil | |
irb(main):003:0> class Fixnum | |
irb(main):004:1> def to_ary; []; end | |
irb(main):005:1> end | |
=> nil | |
irb(main):006:0> a,b,c=1; p a,b,c | |
nil | |
nil | |
nil | |
=> nil | |
irb(main):007:0> [subbu@earth ~] ast -e "a,b,c,=1" | |
RootNode 0 | |
NewlineNode 0 | |
MultipleAsgnNode 0 | |
ArrayNode 0 | |
LocalAsgnNode:a 0 | |
LocalAsgnNode:b 0 | |
LocalAsgnNode:c 0 | |
ToAryNode 0 | |
FixnumNode 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment