opal fix for indexes

This commit is contained in:
Torsten Ruger 2015-11-04 16:11:25 +02:00
parent b5e733cd11
commit 428faad25f

View File

@ -66,7 +66,7 @@ module Parfait
end
def instance_length
self.get_length / 2
(self.get_length / 2).to_i # to_i for opal
end
alias :super_index :index_of
@ -80,7 +80,7 @@ module Parfait
has = super_index(name)
return nil unless has
raise "internal error #{name}:#{has}" if has < 1
1 + has / 2
(1 + has / 2).to_i # to_i for opal
end
def inspect