summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-16 08:03:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-16 08:03:03 +0000
commit401805ec1330c761ee922e895f797da05968ca20 (patch)
tree2067e128a0b6b5047376920f5ef9ff7ba07ea7f5 /eval.c
parent51e7fc687e6d66d02b37550ca1dd005247bc715f (diff)
* 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
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/eval.c b/eval.c
index 0d25a62..2449779 100644
--- a/eval.c
+++ b/eval.c
@@ -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;