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:
Matt Moretti
2025-12-23 10:26:27 -05:00
parent 8e70162472
commit 411e86e5c3

View File

@@ -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