diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-16 08:03:03 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-16 08:03:03 +0000 |
commit | 401805ec1330c761ee922e895f797da05968ca20 (patch) | |
tree | 2067e128a0b6b5047376920f5ef9ff7ba07ea7f5 | |
parent | 51e7fc687e6d66d02b37550ca1dd005247bc715f (diff) | |
download | ruby-401805ec1330c761ee922e895f797da05968ca20.tar.gz |
* eval.c (proc_invoke): format the message for localjump_error().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | eval.c | 7 |
2 files changed, 8 insertions, 3 deletions
@@ -1,3 +1,7 @@ +Mon Jun 16 17:02:57 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net> + + * eval.c (proc_invoke): format the message for localjump_error(). + Mon Jun 16 16:23:56 2003 NAKAMURA Usaku <usa@ruby-lang.org> * ext/dl/dl.c (rb_dl_callback): use rb_block_proc() instead of @@ -6995,9 +6995,10 @@ proc_invoke(proc, args, self, klass) result = prot_tag->retval; } else if (orphan) { /* orphan block */ - localjump_error("%s from block-closure", - state == TAG_BREAK ? "break" : "return", - prot_tag->retval, state); + char mesg[32]; + snprintf(mesg, sizeof mesg, "%s from block-closure", + state == TAG_BREAK ? "break" : "return"); + localjump_error(mesg, prot_tag->retval, state); } else { ruby_block->tag->dst = incoming_state; |