mirror of
https://github.com/edgecase/ruby_koans.git
synced 2026-04-13 06:43:20 -04:00
Fix assertion about the class of #object_id
In Ruby 2.4, `Fixnum` and `Bignum` were unified into `Integer` and the "bigness" of that integer became an internal implementation detail. Because the koans support some pretty old rubies, we can't make a universal assertion about the class of `Object.new.object_id`, but it always `is_a? Integer`.
This commit is contained in:
@@ -21,7 +21,7 @@ class AboutObjects < Neo::Koan
|
||||
|
||||
def test_every_object_has_an_id
|
||||
obj = Object.new
|
||||
assert_equal __(Fixnum), obj.object_id.class
|
||||
assert obj.object_id.is_a?(__(Integer))
|
||||
end
|
||||
|
||||
def test_every_object_has_different_id
|
||||
|
||||
Reference in New Issue
Block a user