diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-01 12:56:29 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-01 12:56:29 +0000 |
commit | 19ffc6371c06983fd437b73512101ccc3b14bac2 (patch) | |
tree | 3aedd35c5c4b8c3def6993419bfc655ca03316b4 /variable.c | |
parent | 638a7a9c546f867882ee3d19af458bb25f62fb01 (diff) | |
download | ruby-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 'variable.c')
-rw-r--r-- | variable.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/variable.c b/variable.c index 58fd17b78..2ddfb1ac5 100644 --- a/variable.c +++ b/variable.c @@ -1166,7 +1166,8 @@ check_autoload_table(VALUE av) Check_Type(av, T_DATA); if (RDATA(av)->dmark != (RUBY_DATA_FUNC)rb_mark_tbl || RDATA(av)->dfree != (RUBY_DATA_FUNC)st_free_table) { - rb_raise(rb_eTypeError, "wrong autoload table: %s", RSTRING_PTR(rb_inspect(av))); + VALUE desc = rb_inspect(av); + rb_raise(rb_eTypeError, "wrong autoload table: %s", RSTRING_PTR(desc)); } return (struct st_table *)DATA_PTR(av); } |