diff --git a/spec/method_spec.rb b/spec/method_spec.rb index de902a03..0c49d104 100644 --- a/spec/method_spec.rb +++ b/spec/method_spec.rb @@ -144,13 +144,16 @@ describe Pry::Method do m.name.should == "gag" end - it "should find the right method from a BasicObject" do - a = Class.new(BasicObject) { def gag; ::Kernel.binding; end; def self.line; __LINE__; end } + # Temporarily disabled to work around rubinius/rubinius#2871. + unless Pry::Helpers::BaseHelpers.rbx? + it "should find the right method from a BasicObject" do + a = Class.new(BasicObject) { def gag; ::Kernel.binding; end; def self.line; __LINE__; end } - m = Pry::Method.from_binding(a.new.gag) - m.owner.should == a - m.source_file.should == __FILE__ - m.source_line.should == a.line + m = Pry::Method.from_binding(a.new.gag) + m.owner.should == a + m.source_file.should == __FILE__ + m.source_line.should == a.line + end end it 'should find the right method even if it was renamed and replaced' do