Project

General

Profile

Actions

Bug #13523

closed

negative line numbers in instance_eval are misinterpreted in 32-bit ruby-trunk

Added by Eregon (Benoit Daloze) about 7 years ago. Updated over 6 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:80920]

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

https://github.com/ruby/spec/blob/51bc2c1c8cd387ec99106b5f27eb5d0ab48fc560/core/basicobject/instance_eval_spec.rb#L172-L179

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0