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 | 49be22d8dfaa82da0b5f0538096ec1338e3c9a61 (patch) | |
tree | 3aedd35c5c4b8c3def6993419bfc655ca03316b4 /variable.c | |
parent | 2c8e7a50c1db8fea3fb012052828ad1eea51883f (diff) | |
download | ruby-49be22d8dfaa82da0b5f0538096ec1338e3c9a61.tar.gz |
* 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: svn+ssh://ci.ruby-lang.org/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 58fd17b78c..2ddfb1ac5b 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); } |