summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-16 03:00:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-16 03:00:44 +0000
commit817eb7d17d3f1327dfb4c706ef6604dd1483ece7 (patch)
tree472b40718e5ce09a4f83fae65d4675ab2f835426 /vm_insnhelper.c
parente2ca7837d1d8afbbcb2387d1c22a016e799024e4 (diff)
* vm_insnhelper.c (argument_error): use line number at the beginning
of lambda, not the first code ob its body. [ruby-core:43314][Bug #6151] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 4f24f0f640..68c2a2eae3 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -130,11 +130,7 @@ argument_error(const rb_iseq_t *iseq, int miss_argc, int min_argc, int max_argc)
VALUE err_line = 0;
if (iseq) {
- int line_no = 1;
-
- if (iseq->line_info_size) {
- line_no = iseq->line_info_table[0].line_no;
- }
+ int line_no = rb_iseq_first_lineno(iseq);
err_line = rb_sprintf("%s:%d:in `%s'",
RSTRING_PTR(iseq->filename),