diff --git a/spec/macruby/core/range_spec.rb b/spec/macruby/core/range_spec.rb index afdbbc9ca..8cb88ac9b 100644 --- a/spec/macruby/core/range_spec.rb +++ b/spec/macruby/core/range_spec.rb @@ -11,7 +11,7 @@ it "responds to #relative_to, which returns a new Range object without negative indicies" do ( 0 .. 10).relative_to(11).should == (0..10) ( 1 .. 9 ).relative_to(11).should == (1..9 ) - ( 0 .. 15).relative_to(11).should == (0..10) + ( 0 .. 15).relative_to(11).should == (0..11) ( 0 .. -1 ).relative_to(11).should == (0..10) ( 0 .. -2 ).relative_to(11).should == (0..9 ) diff --git a/spec/macruby/language/objc_method_spec.rb b/spec/macruby/language/objc_method_spec.rb index b3294a6b5..615d86658 100644 --- a/spec/macruby/language/objc_method_spec.rb +++ b/spec/macruby/language/objc_method_spec.rb @@ -368,12 +368,12 @@ def o2.to_str; 'foo' end end it "accepting a Range as a structure type should receive a NSRange C structure" do - @o.methodAcceptingNSRange(0..41).should == 0 + @o.methodAcceptingNSRange(0..41).should == 1 @o.methodAcceptingNSRange(1..42).should == 0 - @o.methodAcceptingNSRange(0..42).should == 1 - @o.methodAcceptingNSRange(0...42).should == 0 + @o.methodAcceptingNSRange(0..42).should == 0 + @o.methodAcceptingNSRange(0...42).should == 1 @o.methodAcceptingNSRange(1...42).should == 0 - @o.methodAcceptingNSRange(0...43).should == 1 + @o.methodAcceptingNSRange(0...43).should == 0 lambda { @o.methodAcceptingNSRange(-1..1) }.should raise_error(ArgumentError) lambda { @o.methodAcceptingNSRange(1..-1) }.should raise_error(ArgumentError)