Actions
Bug #13523
closednegative line numbers in instance_eval are misinterpreted in 32-bit ruby-trunk
Description
As can be seen on http://rubyci.org/, 32-bit ruby-trunk seems to have regressed and no longer handles negative line number in #instance_eval correctly.
Specifically, this spec fails:
it "evaluates string with given filename and negative linenumber" do
err = begin
Object.new.instance_eval("\n\nraise\n", "b_file", -100)
rescue => e
e
end
err.backtrace.first.split(":")[0..1].should == ["b_file", "-98"]
end
Updated by Eregon (Benoit Daloze) about 7 years ago
Actually this also happens on older release, there are just less 32-bit builders on older versions:
http://rubyci.org/logs/www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20170428T070500Z.fail.html.gz
Updated by nobu (Nobuyoshi Nakada) about 7 years ago
- Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN to 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED
Updated by nobu (Nobuyoshi Nakada) about 7 years ago
- Status changed from Open to Closed
Applied in changeset trunk|r58503.
node.h: sign-extend
- node.h (nd_line): should sign-extend. shifting
VALUE
extends
with zero bits ifsizeof(VALUE)
equals tosizeof(int)
. the
zero bits are truncated ifsizeof(VALUE)
is bigger enough.
[ruby-core:80920] [Bug #13523]
Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago
- Backport changed from 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED to 2.2: REQUIRED, 2.3: REQUIRED, 2.4: DONE
ruby_2_4 r59488 merged revision(s) 58503.
Updated by usa (Usaku NAKAMURA) over 6 years ago
- Backport changed from 2.2: REQUIRED, 2.3: REQUIRED, 2.4: DONE to 2.2: REQUIRED, 2.3: DONE, 2.4: DONE
ruby_2_3 r59541 merged revision(s) 58503.
Actions
Like0
Like0Like0Like0Like0Like0