summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-05-12 07:17:49 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-05-12 07:17:49 +0900
commit955c7f703e2ee81d3b5bf1eec60ff2d24ee6da11 (patch)
tree963f8ca2202f7fefba44bd1bb592882778de1bb2
parent2a280a8f70fe0eea5937b37888c5d77a2ada7bc5 (diff)
downloadmruby-955c7f703e2ee81d3b5bf1eec60ff2d24ee6da11.tar.gz
mruby-955c7f703e2ee81d3b5bf1eec60ff2d24ee6da11.zip
array.rb: add `Array#entries` as an alias to `Array#to_a`.
The performance of `Enumerable#entries` are significantly slower than `Array#to_a`.
-rw-r--r--mrblib/array.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/mrblib/array.rb b/mrblib/array.rb
index 18b729128..f74da332c 100644
--- a/mrblib/array.rb
+++ b/mrblib/array.rb
@@ -276,4 +276,5 @@ class Array
def to_a
self
end
+ alias entries to_a
end