Skip to content

Commit

Permalink
expand method for multiple slides
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Love authored and Justin Love committed Feb 9, 2010
1 parent 202f29c commit 634c2c0
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions method.rb
@@ -1,7 +1,15 @@
1.method(:+).call(2)
def adder(a)
return lambda {|b| a + b}
end

1.method(:+).class
plus1 = adder(1)
plus1.call(2)

Fixnum.instance_method(:+).class
plus1 = 1.method(:+)
plus1.call(2)

Fixnum.instance_method(:+).respond_to?(:call)
plus1.class

im = Fixnum.instance_method(:+)

im.respond_to?(:call)

0 comments on commit 634c2c0

Please sign in to comment.