/ Published in: Ruby
Expand |
Embed | Plain Text
#!/usr/bin/ruby class MyFixnum def initialize( i ) @i = i end def pp @i += 1 end end a = MyFixnum.new( 7 ) puts a.pp
You need to login to post a comment.
gdonald on 09/27/06
1 person have marked this snippet as a favorite
#!/usr/bin/ruby class MyFixnum def initialize( i ) @i = i end def pp @i += 1 end end a = MyFixnum.new( 7 ) puts a.pp
You need to login to post a comment.