small opal fix
the return didn’t work but couldn’t reproduce in opal try
This commit is contained in:
parent
49b25ad971
commit
fdc7f8b39c
@ -163,12 +163,12 @@ module Parfait
|
|||||||
# Lists start from index 1
|
# Lists start from index 1
|
||||||
define_method :get do | index|
|
define_method :get do | index|
|
||||||
raise "Only positive indexes, #{index}" if index <= 0
|
raise "Only positive indexes, #{index}" if index <= 0
|
||||||
if index > self.get_length
|
ret = nil
|
||||||
return nil
|
if(index <= self.get_length)
|
||||||
else
|
|
||||||
# start one higher than offset, which is where the length is
|
# start one higher than offset, which is where the length is
|
||||||
return internal_object_get(index + offset + 1)
|
ret = internal_object_get(index + offset + 1)
|
||||||
end
|
end
|
||||||
|
ret
|
||||||
end
|
end
|
||||||
|
|
||||||
define_method :grow_to do | len|
|
define_method :grow_to do | len|
|
||||||
|
Loading…
Reference in New Issue
Block a user