summaryrefslogtreecommitdiff
path: root/spec/ruby/core/basicobject/equal_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/basicobject/equal_spec.rb')
-rw-r--r--spec/ruby/core/basicobject/equal_spec.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/ruby/core/basicobject/equal_spec.rb b/spec/ruby/core/basicobject/equal_spec.rb
index 8120df836f..ce28eaed95 100644
--- a/spec/ruby/core/basicobject/equal_spec.rb
+++ b/spec/ruby/core/basicobject/equal_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../../shared/kernel/equal', __FILE__)
+require_relative '../../spec_helper'
+require_relative '../../shared/kernel/equal'
describe "BasicObject#equal?" do
it "is a public instance method" do
@@ -11,8 +11,10 @@ describe "BasicObject#equal?" do
it "is unaffected by overriding __id__" do
o1 = mock("object")
o2 = mock("object")
- def o1.__id__; 10; end
- def o2.__id__; 10; end
+ suppress_warning {
+ def o1.__id__; 10; end
+ def o2.__id__; 10; end
+ }
o1.equal?(o2).should be_false
end