Skip to content

Commit

Permalink
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions spec/ruby/core/kernel/itself_spec.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)

describe "Kernel#itself" do
it "should return the receiver" do
num = 2

num.itself.should = num
ruby_version_is "2.2" do
it "returns the receiver itself" do
foo = Object.new
foo.itself.should equal foo
foo.itself.object_id.should equal foo.object_id
end
end
end

0 comments on commit 043cd9d

Please sign in to comment.