Skip to content

Commit

Permalink
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions corelib/opal/native.rb
Original file line number Diff line number Diff line change
@@ -64,6 +64,14 @@ def self.call(obj, key, *args)
}
end

def self.new(native)
if self == Native
raise ArgumentError, "cannot instantiate non derived Native"
else
super(native)
end
end

def initialize(native)
@native = Native.convert(native)
end

0 comments on commit 6c45580

Please sign in to comment.