diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-30 18:49:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-30 18:49:00 +0000 |
commit | 7aaf7dac8d312b6b1a27ea8240d2818c5c77ee17 (patch) | |
tree | 12e2acf0563c5b6d05ae9c9f65adafa46be6fe3a /bootstraptest | |
parent | 70f5d818f8f4956354221e7977bb1b8b40c00a5a (diff) | |
download | ruby-7aaf7dac8d312b6b1a27ea8240d2818c5c77ee17.tar.gz |
* parse.y (assignable_gen): ignore already erred names.
* parse.y (shadowing_lvar_gen): always make new block local variable
when shadowing outer local variable. [ruby-dev:31507]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_knownbug.rb | 11 | ||||
-rw-r--r-- | bootstraptest/test_massign.rb | 6 |
2 files changed, 7 insertions, 10 deletions
diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index ed9f6c1c41..382f027b34 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -3,16 +3,7 @@ # So all tests will cause failure. # -# massign -assert_equal 'ok', %q{ - def m() - yield :ng - end - r = :ok - m {|(r)|} - r -}, '[ruby-dev:31507]' - +# catch/throw assert_equal 'ok', %q{ begin catch {|t| throw t, :ok } diff --git a/bootstraptest/test_massign.rb b/bootstraptest/test_massign.rb index c95c178721..0c73b71461 100644 --- a/bootstraptest/test_massign.rb +++ b/bootstraptest/test_massign.rb @@ -13,6 +13,12 @@ assert_equal '[1, 2]', %q{ ans } +assert_equal 'ok', %q{ + r = :ok + :ng.tap {|(r)|} + r +}, '[ruby-dev:31507]' + =begin # generated by this script: |