Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Put #object_id/#__id__/#id specs in the right place
1.8 defines Object#object_id, Object#__id__, and Object#id. 1.9 defines BasicObject#__id__ and Object#object_id. These methods aren't defined on Kernel, they shouldn't be in the kernel subdirectory.
- Loading branch information
1 parent
8e12483
commit 9af5570
Showing
8 changed files
with
46 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
require File.expand_path('../../../shared/object/object_id', __FILE__) | ||
|
||
ruby_version_is "1.9" do | ||
describe "BasicObject#__id__" do | ||
it_behaves_like :basic_object_id, :__id__, BasicObject | ||
it_behaves_like :object_id, :__id__, Object | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
require File.expand_path('../../../shared/object/object_id', __FILE__) | ||
|
||
ruby_version_is "".."1.9" do | ||
describe "Object#__id__" do | ||
it_behaves_like :basic_object_id, :__id__, Object | ||
it_behaves_like :object_id, :__id__, Object | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
require File.expand_path('../../../shared/object/object_id', __FILE__) | ||
|
||
ruby_version_is "".."1.9" do | ||
describe "Object#id" do | ||
it_behaves_like :basic_object_id, :id, Object | ||
it_behaves_like :object_id, :id, Object | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
require File.expand_path('../../../shared/object/object_id', __FILE__) | ||
|
||
describe "Object#object_id" do | ||
it_behaves_like :basic_object_id, :object_id, Object | ||
it_behaves_like :object_id, :object_id, Object | ||
end |
22 changes: 12 additions & 10 deletions
22
core/kernel/shared/object_id.rb → shared/object/object_id.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters