Skip to content

Commit 411e86e

Browse files
committed
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`.
1 parent 8e70162 commit 411e86e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/about_objects.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test_objects_can_be_inspected
2121

2222
def test_every_object_has_an_id
2323
obj = Object.new
24-
assert_equal __(Fixnum), obj.object_id.class
24+
assert obj.object_id.is_a?(__(Integer))
2525
end
2626

2727
def test_every_object_has_different_id

0 commit comments

Comments
 (0)