Skip to content

Commit 9daa25f

Browse files
committed
Autocorrect and replace is_a? and kind_of? with Primitive.object_kind_of?
1 parent 1899514 commit 9daa25f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/ruby/truffleruby/core/integer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def round(ndigits = undefined, half: :up)
209209

210210
f = 10 ** ndigits
211211

212-
if kind_of? Integer and Primitive.object_kind_of?(f, Integer)
212+
if Primitive.object_kind_of?(self, Integer) and Primitive.object_kind_of?(f, Integer)
213213
x = self < 0 ? -self : self
214214
case half
215215
when :up, nil

src/main/ruby/truffleruby/core/kernel.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def load(filename, wrap = false)
373373

374374
# module_to_wrap either is a module or is nil
375375
if wrap
376-
module_to_wrap = wrap.is_a?(Module) ? wrap : Module.new
376+
module_to_wrap = Primitive.object_kind_of?(wrap, Module) ? wrap : Module.new
377377
end
378378

379379
# load absolute path

0 commit comments

Comments
 (0)