| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2020-06-20 | Move definition of `BasicObject#!=` to `mrblib`. | Yukihiro "Matz" Matsumoto | |
| C implementation used `mrb_funcall()` that bypassed many optimization. | |||
| 2020-05-09 | Fix some `Hash` methods are inconsistent with `values` | KOBAYASHI Shuji | |
| Inconsistent when hash has duplicate key. ### Example ```ruby # example.rb keys = (1..3).map{[_1]} h = keys.to_h{[_1, _1[0]]} keys[0][0] = 2 p h.values p h.each_value.to_a p h ``` #### Before this patch: ```console $ bin/mruby example.rb [1, 2, 3] [1, 1, 3] {[2]=>1, [2]=>1, [3]=>3} ``` #### After this patch (same as Ruby) ```console $ bin/mruby example.rb [1, 2, 3] [1, 2, 3] {[2]=>1, [2]=>2, [3]=>3} ``` | |||
| 2019-12-27 | Use Rake DSL instead of commands of `FileUtils` | KOBAYASHI Shuji | |
| - Respect `--verbose(-v)` and `--dry-run(-n)` options. - Silence warnings to keyword arguments on Ruby 2.7. | |||
| 2019-09-12 | Merge pull request #4527 from lopopolo/string-each-line-paragraph-mode | Yukihiro "Matz" Matsumoto | |
| Add paragraph mode to String#each_line in mrblib | |||
| 2019-08-17 | Implement `Array#each` using inline mruby bytecode. | Yukihiro "Matz" Matsumoto | |
| 2019-08-16 | Implement `Class#new` using inline mruby bytecode. | Yukihiro "Matz" Matsumoto | |
| 2019-08-14 | Integrate `kazuho/mruby-class-new-fiber-safe` in the master. | Yukihiro "Matz" Matsumoto | |
| Avoid calling `initialize` via `mrb_funcall`, which cause `cross C boundary` error from Fibers started in the method. | |||
| 2019-08-10 | `Enumerable#reject`, etc. should return `Enumerable` without block | KOBAYASHI Shuji | |
| 2019-07-17 | Fixed a bug in #4034 | Yukihiro "Matz" Matsumoto | |
| 2019-07-17 | Merge branch 'master' into i110/inspect-recursion | Yukihiro "Matz" Matsumoto | |
| 2019-07-13 | `Enumerable#detect` {and `#find`} should call `ifnone`; fix #4484 | Yukihiro "Matz" Matsumoto | |
| It's an error in ISO specification; 15.3.2.2.4 and 15.3.2.2.7 | |||
| 2019-07-07 | Fix `Numeric#step` to infinity; ref. #4555 | KOBAYASHI Shuji | |
| 2019-06-29 | Replace `String#[]=` method by C implements | dearblue | |
| The purpose is to eliminate string objects that are temporarily created during processing. | |||
| 2019-06-25 | Unify loops to minimize bytecode size | Ryan Lopopolo | |
| 2019-06-23 | Use explicit block parameter | Ryan Lopopolo | |
| 2019-06-23 | Optimize String#each_line | Ryan Lopopolo | |
| 2019-06-22 | Speed up base case by 2x | Ryan Lopopolo | |
| Make non-paragraph mode twice as fast. Performance is within a factor of 2 of the original implementation. | |||
| 2019-06-22 | Add paragraph mode to String#each_line in mrblib | Ryan Lopopolo | |
| mruby/mruby#4511 demonstrated an infinite loop in `String#each_line` when given an empty string separator. In MRI, an empty separator places String#each_line in paragraph mode, where the String is separated on successive runs of newlines. In paragraph mode, the String `"abc\n\n\ndef\nxyz"` is split into `["abc\n\n\n", "def\nxyz"]`. This commit makes the String#each_line implementation as close to ruby/spec compliant as possible given the limitations of mruby core. With this patch, the following specs fail for `String#each_line`: - uses `$/` as the separator when none is given (can be fixed by aliasing and redefining the method to use $/ as the default value of separator in mruby-io) - when no block is given returned Enumerator size should return nil (`Enumerator#size` is not supported on mruby) - tries to convert the separator to a string using to_str (`String#to_str` is not implemented on mruby) This patch has similar memory consumption compared to the prior implementation and is takes 4x the time the prior implementation takes to execute: ```console /usr/bin/time -l ./bin/mruby -e '("aaa\n\nbbbbb\n\n\n\n\ncccc" * 100000).each_line("\n") { }'; ``` | |||
| 2019-06-04 | Fix typo in `mrblib/range.rb` [ci skip] | KOBAYASHI Shuji | |
| 2019-05-15 | Add Enumerator support to `String#each_byte`. | Yukihiro "Matz" Matsumoto | |
| `String#each_byte` is not defined in ISO Ruby but it is implemented in the core mruby because it's useful. | |||
| 2019-05-15 | Remove `String#=~` and `String#match` that requires `Regexp`. | Yukihiro "Matz" Matsumoto | |
| 2019-04-27 | Remove duplicated `String#each_char` | KOBAYASHI Shuji | |
| 2019-04-21 | Commented out `String#scan` because it is not implemented yet | KOBAYASHI Shuji | |
| 2019-04-19 | Add type check (conversion) in `String#[]=` | KOBAYASHI Shuji | |
| Before this patch: 'a'[0] = 1 #=> 1 'a'[:a] = '1' #=> ArgumentError 'a'[:a, 0] = '1' #=> ArgumentError 'a'[0, :a] = '1' #=> ArgumentError 'a'[0, 1] = 1 #=> 1 After this patch / Ruby: 'a'[0] = 1 #=> TypeError 'a'[:a] = '1' #=> TypeError 'a'[:a, 0] = '1' #=> TypeError 'a'[0, :a] = '1' #=> TypeError 'a'[0, 1] = 1 #=> TypeError | |||
| 2019-04-18 | Remove duplicated `include Comparable` in `mrblib/string.rb` | KOBAYASHI Shuji | |
| 2019-04-08 | Avoid infinite loop when no `Regexp` class is available; fix #4363 | Yukihiro "Matz" Matsumoto | |
| 2019-03-02 | Raise error on failed comparison in `sort`; ref #4307 | Yukihiro "Matz" Matsumoto | |
| 2019-02-01 | Move `NONE` to `mrblib/enum.rb` | KOBAYASHI Shuji | |
| 2019-01-16 | Avoid runtime evaluation for `MRB_WITHOUT_FLOAT` | KOBAYASHI Shuji | |
| 2019-01-15 | Fix coercing for first step counter in `Numeric#step` | KOBAYASHI Shuji | |
| Before: a=[]; 7.step(4, -3.0) { |c| a << c }; p a #=> [7, 4.0] After / Ruby: a=[]; 7.step(4, -3.0) { |c| a << c }; p a #=> [7.0, 4.0] | |||
| 2019-01-04 | Integrate mrblib/float.rb into src/numeric.c | KOBAYASHI Shuji | |
| - Avoid hack for `MRB_WITHOUT_FLOAT` in build scripts - Avoid runtime dispatch for `MRB_WITHOUT_FLOAT` | |||
| 2019-01-03 | Remove `Kernel#class_defined?` which is not available in CRuby; #3829 | Yukihiro "Matz" Matsumoto | |
| 2018-11-19 | Avoid assignments from type checking `String#__to_str`. | Yukihiro "Matz" Matsumoto | |
| 2018-11-19 | Removed `to_hash` conversion method. | Yukihiro "Matz" Matsumoto | |
| 2018-11-19 | Remove implicit conversion using `to_str` method; fix #3854 | Yukihiro "Matz" Matsumoto | |
| We have added internal convenience method `__to_str` which does string type check. The issue #3854 was fixed but fundamental flaw of lack of stack depth check along with fibers still remains. Use `MRB_GC_FIXED_ARENA` for workaround. | |||
| 2018-11-19 | Remove 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-29 | Rename libmruby stuff to avoid confusion | take-cheeze | |
| 2018-10-29 | Re-implement `Array#_inspect` and `Hash#_inspect` without blocks. | Yukihiro "Matz" Matsumoto | |
| To reduce the env object allocation; ref #4143 | |||
| 2018-10-18 | replace quicksort with mergesort. | Tomoyuki Sahara | |
| 2018-09-26 | Implement `Hash#rehash` in C using `sg_compact()`. | Yukihiro "Matz" Matsumoto | |
| 2018-09-26 | Add index to larger segment lists for performance | Yukihiro "Matz" Matsumoto | |
| 2018-09-26 | Use `mrb_undef_value` for delete mark instead of shifting Hash entry table. | Yukihiro "Matz" Matsumoto | |
| That means entry table should be compacted periodically by `sg_compact()`. | |||
| 2018-09-20 | Move `Symbol#to_proc` to the core from `mruby-symbol-ext` gem. | Yukihiro "Matz" Matsumoto | |
| Even though `Symbol#to_proc` is not included in ISO standard, the `some_method(&:method_name)` is used very widely and convenient. So we moved it to the core. | |||
| 2018-09-01 | Fix ISO/JIS section numbers. | Yukihiro "Matz" Matsumoto | |
| 2018-08-25 | Remove unused `Hash#__update` method. | Yukihiro "Matz" Matsumoto | |
| 2018-08-25 | Make `Array.new` to accept both integers and floats. | Yukihiro "Matz" Matsumoto | |
| This time we used `Integral` module which is mruby specific. | |||
| 2018-08-25 | Fixed the corner case bug in `String#{gsub!,sub!}`. | Yukihiro "Matz" Matsumoto | |
| `"a".sub!("a", "a")` should not return `nil`. | |||
| 2018-06-04 | Let inspect recursion do the right thing | Ichito Nagata | |
| 2018-06-01 | let Hash#merge keep ifnone value | Ichito Nagata | |
| 2018-04-28 | Update the patch to not use `funcall` in C; ref #4013 | Yukihiro "Matz" Matsumoto | |
