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 | 1685a311a61051320ead8629fe7c458bca70506e (patch) | |
| tree | 2067e128a0b6b5047376920f5ef9ff7ba07ea7f5 | |
| parent | 30d23ed4486a68ae2c18d34b3f8e522998f748a9 (diff) | |
| download | ruby-1685a311a61051320ead8629fe7c458bca70506e.tar.gz ruby-1685a311a61051320ead8629fe7c458bca70506e.tar.xz ruby-1685a311a61051320ead8629fe7c458bca70506e.zip | |
* eval.c (proc_invoke): format the message for localjump_error().
git-svn-id: http://svn.ruby-lang.org/repos/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; |
