Project

General

Profile

Bug #10748 ยป flatten.rb

ryannevell (Ryan Nevell), 01/16/2015 07:45 PM

 
class Foo
def respond_to?(name, include_private = true)
puts "respond_to?(#{name})"
super
end

def method_missing(name, *args)
puts "method_missing(#{name})"
super
end
end

puts "[[Foo.new]].flatten(1)"
p [[Foo.new]].flatten(1)

puts
puts "[[[Foo.new]]].flatten(2)"
p [[[Foo.new]]].flatten(2)

puts
puts "[[[Foo.new]]].flatten(1)"
p [[[Foo.new]]].flatten(1)

    (1-1/1)