Skip to content

Commit d21fba0

Browse files
committed
Fix Native::Object#is_a? semantics
1 parent 8462178 commit d21fba0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/native.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,13 @@ def nil?
229229
end
230230

231231
def is_a?(klass)
232-
klass == Native
232+
`$opal.is_a(self, klass)`
233233
end
234234

235235
alias kind_of? is_a?
236236

237237
def instance_of?(klass)
238-
klass == Native
238+
`self._klass === klass`
239239
end
240240

241241
def class

0 commit comments

Comments
 (0)