summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-24 15:47:22 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-24 15:47:22 +0000
commita5e89ea4e76e4e169162cab2959c4c6e1214d212 (patch)
tree4996924284200552773d9445b273f741d8aad15a /iseq.c
parent876fb07fde3bebdc27efc91df67de5cd4b40aa52 (diff)
merge revision(s) 39536: [Backport #7989]
* iseq.c (iseq_data_to_ary): fix condition. r34303 introduces a bug to avoid all line information from a result of ISeq#to_a. This is a regression problem from 2.0.0p0. * test/ruby/test_iseq.rb: add a test of lines after ISeq#to_a. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iseq.c b/iseq.c
index a296544320..15c1fe13ae 100644
--- a/iseq.c
+++ b/iseq.c
@@ -1841,7 +1841,7 @@ iseq_data_to_ary(rb_iseq_t *iseq)
rb_ary_push(body, (VALUE)label);
}
- if (iseq->line_info_size < ti && iseq->line_info_table[ti].position == pos) {
+ if (ti < iseq->line_info_size && iseq->line_info_table[ti].position == pos) {
line = iseq->line_info_table[ti].line_no;
rb_ary_push(body, INT2FIX(line));
ti++;