summaryrefslogtreecommitdiffstats
path: root/bootstraptest
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-01 12:56:29 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-01 12:56:29 +0000
commit19ffc6371c06983fd437b73512101ccc3b14bac2 (patch)
tree3aedd35c5c4b8c3def6993419bfc655ca03316b4 /bootstraptest
parent638a7a9c546f867882ee3d19af458bb25f62fb01 (diff)
downloadruby-19ffc6371c06983fd437b73512101ccc3b14bac2.tar.gz
ruby-19ffc6371c06983fd437b73512101ccc3b14bac2.tar.xz
ruby-19ffc6371c06983fd437b73512101ccc3b14bac2.zip
* eval_jump.ci (rb_f_catch): generate new tag object if no argument is
given. backported from MatzRuby. [ruby-dev:31609] * eval_jump.ci (rb_catch): call #catch without arguments if tag string is NULL. * eval_jump.ci (rb_f_throw): allow throwing non-symbol object. * eval.c (rb_catch_obj): new function to wait throw with arbitrary object. * eval.c (rb_throw_obj): new function to throw arbitrary object. * variable.c (check_autoload_table): prevent multiple calls from RSTRING_PTR(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_jump.rb7
-rw-r--r--bootstraptest/test_knownbug.rb8
2 files changed, 7 insertions, 8 deletions
diff --git a/bootstraptest/test_jump.rb b/bootstraptest/test_jump.rb
index a83b6f0ea..9ada6829b 100644
--- a/bootstraptest/test_jump.rb
+++ b/bootstraptest/test_jump.rb
@@ -230,3 +230,10 @@ assert_equal %q{1}, %q{
m
}
+assert_equal 'ok', %q{
+ begin
+ catch {|t| throw t, :ok }
+ rescue ArgumentError
+ :ng
+ end
+}, '[ruby-dev:31609]'
diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb
index 382f027b3..b97a08d92 100644
--- a/bootstraptest/test_knownbug.rb
+++ b/bootstraptest/test_knownbug.rb
@@ -3,11 +3,3 @@
# So all tests will cause failure.
#
-# catch/throw
-assert_equal 'ok', %q{
- begin
- catch {|t| throw t, :ok }
- rescue ArgumentError
- :ng
- end
-}, '[ruby-dev:31609]'