Search   Feed   Browse   Add
Feed items 1 - 2 of 2 for April 2008

Ruby, a message to you

Ruby.send(:stop, 'messing around')

Will Rubinius have fewer dark corners - April 23, 2008

Section 3.4.2 of The Ruby Programming Language talks about defining (or overriding) the hash and eql methods of a class in order to control how objects are treated as keys in a hash&8230; except for strings. Strings are handled specially because they&8217;re &8220;mutable but commonly used as hash keys.&8221; So when someone asked today on comp.lang.ruby ...
http://ruby.tie-rack.org/65/will-rubinius-have-fewer-dark-corners/

Evil: knowing when a method got passed the default value - April 12, 2008

Let&8217;s say you&8217;re crazy. Now, as a crazy person, you might have a method like this: def greet_world(salutation="Hello") "salutation World!" end You&8217;re not so crazy that you can&8217;t write working Ruby code. Anyway, it&8217;s totally useful: greet_world =&62; "Hello World!" greet_world('Hi') =&62; "Hi World!" greet_world('Yo') ...
http://ruby.tie-rack.org/64/evil-knowing-when-a-method-got-passed-the-default-value/
Available Archives
- April (2 items)
- May (1 item)
- July (3 items)
- August (4 items)
Sponsored Links
© 2008 FeedCapsule.com  |  Contact