diff options
Diffstat (limited to 'spec/ruby/language')
-rw-r--r-- | spec/ruby/language/END_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/language/END_spec.rb b/spec/ruby/language/END_spec.rb index 762a8db0c0..787f602d88 100644 --- a/spec/ruby/language/END_spec.rb +++ b/spec/ruby/language/END_spec.rb @@ -12,4 +12,8 @@ describe "The END keyword" do it "runs multiple ends in LIFO order" do ruby_exe("END { puts 'foo' }; END { puts 'bar' }").should == "bar\nfoo\n" end + + it "is affected by the toplevel assignment" do + ruby_exe("foo = 'foo'; END { puts foo }").should == "foo\n" + end end |