bruce (owner)

Revisions

gist: 73928 Download_button fork
public
Public Clone URL: git://gist.github.com/73928.git
Embed All Files: show embed
singleton-definition.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
>> a = "foo"
=> "foo"
>> def a.bar
>> p :worked!
>> end
=> nil
>> b = "foo"
=> "foo"
>> a.bar
:worked!
=> nil
>> b.foo
NoMethodError: undefined method `foo' for "foo":String
from (irb):8