Skip to content

Commit

Permalink
add some tests for super with current block
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Sansonetti committed May 4, 2011
1 parent d54db7e commit bb050aa
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test_vm/dispatch.rb
Expand Up @@ -550,3 +550,31 @@ def foo
o.foo
o.foo
}

assert '42', %{
class X
def initialize
yield
end
end
class Y<X
def initialize
super
end
end
Y.new { p 42 }
}

assert '42', %{
class X
def initialize
yield
end
end
class Y<X
def initialize
super()
end
end
Y.new { p 42 }
}

0 comments on commit bb050aa

Please sign in to comment.