summaryrefslogtreecommitdiffhomepage
path: root/mrblib/array.rb
AgeCommit message (Collapse)Author
2021-05-13Simplify module inclusion for `Array`, `Hash` and `Range`.Yukihiro "Matz" Matsumoto
2021-05-12array.rb: add `Array#entries` as an alias to `Array#to_a`.Yukihiro "Matz" Matsumoto
The performance of `Enumerable#entries` are significantly slower than `Array#to_a`.
2020-12-15refactor: remove trailing whitespace from C, Header, Ruby and YAML filesJohn Bampton
Lint
2020-11-25Move inline `iseq` in `array.c` to `array.rb`.Yukihiro "Matz" Matsumoto
There's no efficiency difference since `cdump` is implemented.
2020-11-05Add `Array.new([1,2,3])` initialization.Yukihiro "Matz" Matsumoto
2020-07-22Define `Array#to_a` to avoid unnecessary loops.Yukihiro "Matz" Matsumoto
2020-07-22Small comment fix in `mrblib/array.c`.Yukihiro "Matz" Matsumoto
2019-08-17Implement `Array#each` using inline mruby bytecode.Yukihiro "Matz" Matsumoto
2019-07-17Merge branch 'master' into i110/inspect-recursionYukihiro "Matz" Matsumoto
2019-03-02Raise error on failed comparison in `sort`; ref #4307Yukihiro "Matz" Matsumoto
2018-11-19Remove implicit conversion using `to_int` method.Yukihiro "Matz" Matsumoto
The ISO standard does not include implicit type conversion using `to_int`. This implicit conversion often causes vulnerability. There will be no more attacks like #4120. In addition, we have added internal convenience method `__to_int` which does type check and conversion (from floats).
2018-10-29Re-implement `Array#_inspect` and `Hash#_inspect` without blocks.Yukihiro "Matz" Matsumoto
To reduce the env object allocation; ref #4143
2018-10-18replace quicksort with mergesort.Tomoyuki Sahara
2018-08-13Make `Array.new` to accept both integers and floats.Yukihiro "Matz" Matsumoto
This time we used `Integral` module which is mruby specific.
2018-06-04Let inspect recursion do the right thingIchito Nagata
2018-04-23sort method should not consume system stack.Tomoyuki Sahara
2018-04-17Implement `Array#__svalue` in C.Yukihiro "Matz" Matsumoto
2018-03-16`__sort_sub__` is a method defined in `Array`; fix #3970Yukihiro "Matz" Matsumoto
Reorganize `__sort_sub__` arguments.
2017-08-26Replaced Array#each with while loop for performance reasonsChristopher Aue
Example benchmark: $ time build/bench/bin/mruby -e "Array.new(2_000_000){ |i| i }.index{ |i| i == 1_999_999 }" Before: real 0m0.934s user 0m0.922s sys 0m0.003s After: real 0m0.590s user 0m0.583s sys 0m0.007s
2017-07-30Improved speed of enumeration methodsChristopher Aue
2017-07-25Reimplement sort method to reduce array copying.Yukihiro "Matz" Matsumoto
2015-12-26Refactor Array#eachJun Hiroe
2015-12-15Remove redundant conditions of Array#each in ruby extensionYusuke Tanaka
2015-08-21array.rb: refactor (use onliner code if possible)go.kikuta
2015-08-19array.rb: refactor some codego.kikuta
2015-06-24Remove unnecessary backticks.Franck Verrot
Dr Markus Kuhn published in 1999 an article [1] explaining in details why we shouldn't use the ASCII grave accent (0x60) as a left quotation. Backticks have been used most notably to produce nice-looking LaTeX documents but it doesn't seem to be an issue on modern platforms and for the oldest ones, there are workarounds as mentioned by Dr Kuhn. [1]: https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
2015-05-29update mrblib/*.rb files to conform (some of) Rubocop checksYukihiro "Matz" Matsumoto
2014-07-12rescue SystemStackError that comes from inspecting self-referencing Hashes ↵Yukihiro "Matz" Matsumoto
and Arrays; fix #2461
2014-04-25Refactoring Array#__svaluemirichi
2014-04-02implement part of Array#<=> in CYukihiro "Matz" Matsumoto
2014-04-02implement Array comparisons by RubyYukihiro "Matz" Matsumoto
2014-04-01move Array#inspect implementation to mrblib/array.rbYukihiro "Matz" Matsumoto
2014-03-31according to JIS/ISO, Array is not ComparableYukihiro "Matz" Matsumoto
2014-03-17make Enumerable methods to support multiple values; collect, detect, ↵Yukihiro "Matz" Matsumoto
each_with_index, find_all, inject, max, min, partition, reject, sort
2014-03-17Enumerable#entries to support multiple values; close #1868Yukihiro "Matz" Matsumoto
2014-03-15modify core method that return Enumerator object if not block givenksss
2014-03-14mruby-enumerator: move definitions in core_mod.rb to mrblib coreYukihiro "Matz" Matsumoto
2014-02-08made mrb_define_class to return existing class, with heavy refactoringYukihiro "Matz" Matsumoto
2013-03-03Remove trailing whitespaces. This is just a cosmetic change.Masaki Muranaka
2013-01-18fixed wrong loop termination introduced by 79d38c4Yukihiro Matz Matsumoto
2013-01-16check if array expands in each blockYukihiro Matz Matsumoto
2013-01-16check if array shrinks in each blockYukihiro Matz Matsumoto
2012-12-19small refactoring for Array#eachYukihiro Matz Matsumoto
2012-12-19Update Array#each to be slightly faster.Ryan Scott Lewis
2012-12-16Fix a typo in commentYoji SHIDARA
elment -> element
2012-05-06Modify documentation of ArrayDaniel Bovensiepen
2012-05-02Add Documentation for ArrayDaniel Bovensiepen
2012-04-20add mruby sourcesmimaki