From 49be22d8dfaa82da0b5f0538096ec1338e3c9a61 Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 1 Sep 2007 12:56:29 +0000 Subject: * 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 --- variable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'variable.c') 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); } -- cgit v1.2.3