stdlib/buffer/view.rb in opal-1.3.2 vs stdlib/buffer/view.rb in opal-1.4.0.alpha1
- old
+ new
@@ -25,12 +25,10 @@
def length
`#{@native}.byteLength`
end
- alias size length
-
def get(offset, bits = 8, type = :unsigned, little = false)
`#{@native}["get" + #{Buffer.name_for bits, type}](offset, little)`
end
alias [] get
@@ -102,7 +100,9 @@
end
def set_float64(offset, value, little = false)
`#{@native}.setFloat64(offset, value, little)`
end
+
+ alias size length
end
end