Commit Graph

10337 Commits

Author SHA1 Message Date
KOBAYASHI Shuji ffb700dea0 Fix missing assertions in test/t/syntax.rb 2019-06-09 18:27:28 +09:00
Yukihiro "Matz" Matsumoto a7ae278d1a Merge pull request #4497 from shuujii/remove-Check-the-usage-of-a-NUL-character-test
Remove "Check the usage of a NUL character" test
2019-06-09 07:57:51 +09:00
KOBAYASHI Shuji 2e160f53db Remove "Check the usage of a NUL character" test
Because there is not assertion in this test and NUL character literal is
used in other tests.
2019-06-08 22:32:19 +09:00
Yukihiro "Matz" Matsumoto 2847692d59 Merge pull request #4491 from shuujii/fix-missing-assertions-in-test-t-module.rb
Fix missing assertions in `test/t/module.rb`
2019-06-05 23:10:36 +09:00
KOBAYASHI Shuji dc1905e1bd Fix missing assertions in test/t/module.rb 2019-06-05 19:13:36 +09:00
Yukihiro "Matz" Matsumoto 913a148ddc Merge pull request #4489 from shuujii/fIx-typo-in-mrblib-range.rb
Fix typo in `mrblib/range.rb` [ci skip]
2019-06-05 01:46:58 +09:00
Yukihiro "Matz" Matsumoto d47d561da3 Merge pull request #4490 from dearblue/explicit-cast
Need explicit cast for C++
2019-06-05 01:45:37 +09:00
dearblue 81ea89f10e Need explicit cast for C++ 2019-06-04 21:41:40 +09:00
KOBAYASHI Shuji c75402a57b Fix typo in mrblib/range.rb [ci skip] 2019-06-04 10:45:13 +09:00
Yukihiro "Matz" Matsumoto 3b061a90fe Merge pull request #4485 from shuujii/fix-missing-assertions-in-mruby-objectspace-test
Fix missing assertions in `mruby-objectspace` test
2019-06-02 22:11:43 +09:00
KOBAYASHI Shuji 92f00d3e58 Fix missing assertions in mruby-objectspace test 2019-06-02 19:15:20 +09:00
Yukihiro "Matz" Matsumoto 366617dbc1 Merge pull request #4482 from shuujii/comment-out-the-empty-Array-bsearch_index-test
Comment out the empty `Array#bsearch_index` test
2019-06-01 11:02:07 +09:00
KOBAYASHI Shuji c1e6f324c2 Comment out the empty Array#bsearch_index test 2019-05-31 20:50:54 +09:00
Yukihiro "Matz" Matsumoto 4677918676 Merge pull request #4481 from shuujii/fix-missing-assertions-in-mruby-fiber-test
Fix missing assertions in `mruby-fiber` test
2019-05-30 22:34:54 +09:00
KOBAYASHI Shuji 05056ddac4 Fix missing assertions in mruby-fiber test 2019-05-30 21:42:01 +09:00
Yukihiro "Matz" Matsumoto 729931a06c Fix inverted compilation condition; fix #4478 2019-05-30 12:34:31 +09:00
Yukihiro "Matz" Matsumoto 53f93158a2 Merge pull request #4477 from shuujii/kernel-itself-should-not-be-a-module-function
`Kernel#itself` should not be a module function
2019-05-29 20:16:56 +09:00
KOBAYASHI Shuji 03fce2e206 Kernel#itself should not be a module function 2019-05-29 15:57:18 +09:00
Yukihiro "Matz" Matsumoto 855f2cdeea Slightly simplify Rational#==; ref #4475 2019-05-29 11:49:21 +09:00
Yukihiro "Matz" Matsumoto 2b81ea7ec1 Add mrb_alloca again; ref #4470
This time, the allocated memory comes from the string object, which is
referenced from GC arena. The memory region will be reclaimed when the C
function called from VM is terminated, or the GC arena is restored.
2019-05-29 11:47:12 +09:00
Yukihiro "Matz" Matsumoto a1e1af44d2 Merge pull request #4475 from shuujii/fix-Rational-eq-Complex
Fix `Rational#==(Complex)`
2019-05-29 11:46:42 +09:00
Yukihiro "Matz" Matsumoto 4b82fdb637 Merge pull request #4476 from shuujii/fix-missing-assertions-in-mruby-pack-test
Fix missing assertions in `mruby-pack` test
2019-05-29 10:35:45 +09:00
KOBAYASHI Shuji ffc915fdee Fix missing assertions in mruby-pack test 2019-05-28 18:26:01 +09:00
Yukihiro "Matz" Matsumoto 1727f0b7ff Merge pull request #4474 from shuujii/use-undefined.equal-obj2-instead-of-obj2-eq-undefined-in-assert.rb
Use `$undefined.equal?(obj2)` instead of `obj2 == $undefined` in `ass…
2019-05-28 10:50:30 +09:00
Yukihiro "Matz" Matsumoto 6c5cb109ee Merge pull request #4473 from shuujii/make-some-functions-static-in-mrbgems-mruby-metaprog-src-metaprog.c
Make some functions static in `mrbgems/mruby-metaprog/src/metaprog.c`
2019-05-27 23:32:55 +09:00
KOBAYASHI Shuji a97a455c03 Use $undefined.equal?(obj2) instead of obj2 == $undefined in assert.rb
In case `obj2.==` is broken.
2019-05-27 21:43:55 +09:00
KOBAYASHI Shuji 902b2ce3c6 Fix Rational#==(Complex)
Consider a Numreic class like `Complex` that does not have `<=>` but `==`
works (`0i == 0r` is `true`).
2019-05-27 21:29:49 +09:00
KOBAYASHI Shuji 534b578da7 Make some functions static in mrbgems/mruby-metaprog/src/metaprog.c 2019-05-27 18:26:54 +09:00
Yukihiro "Matz" Matsumoto 8ad777c702 Merge pull request #4470 from dearblue/remove-mrb_alloca
Remove `mrb_alloca()` function
2019-05-27 14:45:10 +09:00
Yukihiro "Matz" Matsumoto 459c439243 Merge pull request #4472 from shuujii/move-mrb_mod_s_nesting-to-mruby-metaprog-gem-from-the-core
Move `mrb_mod_s_nesting()` to `mruby-metaprog` gem from the core
2019-05-27 08:17:06 +09:00
Yukihiro "Matz" Matsumoto 879f1586ab Merge pull request #4471 from shuujii/add-Complex.rect
Add `Complex.rect`
2019-05-26 23:07:11 +09:00
KOBAYASHI Shuji 779251de64 Move mrb_mod_s_nesting() to mruby-metaprog gem from the core 2019-05-26 20:32:04 +09:00
KOBAYASHI Shuji 0bdb185a6f Add Complex.rect 2019-05-26 20:17:03 +09:00
Yukihiro "Matz" Matsumoto 4261ba9443 Remove some overhead from methods defined in Ruby in Complex. 2019-05-26 09:19:29 +09:00
Yukihiro "Matz" Matsumoto c33ab7c0bb Merge pull request #4469 from dearblue/double-rounds
Fix double rounded by negative index for `String#[]`
2019-05-26 09:17:40 +09:00
dearblue d1e1bb0d5b Remove mrb_alloca() function
When I found this function, I expected it to behave the same as the
`alloca(3)` function, but it is accually the `mrb_alloca()` function
does not free the heap until the `mrb_close()` function is called.

Also, even if it is deleted, it can be replaced with the combination
of the `MRB_TT_DATA` object and the `mrb_gv_set()` function if it is
sure necessary.
2019-05-25 23:59:43 +09:00
dearblue ecfca8def7 Fix double rounded by negative index
- Before patched:
  ```
  $ mruby -e 'p (-12..-1).map { |i| "Hello"[i] }.join'
  "HelloHello"
  ```
- After patched:
  ```
  $ mruby -e 'p (-12..-1).map { |i| "Hello"[i] }.join'
  "Hello"
  ```
2019-05-25 22:43:07 +09:00
Yukihiro "Matz" Matsumoto f455cb6c40 Merge pull request #4467 from dearblue/naming-mrb_range_beg_len
Name the return value of `mrb_range_beg_len()`
2019-05-25 22:25:58 +09:00
dearblue 56e0e1934d Name the return value of mrb_range_beg_len() 2019-05-25 12:12:21 +09:00
Yukihiro "Matz" Matsumoto c6f30e8f17 Merge pull request #4466 from shuujii/fix-the-order-of-expected-and-actual-in-mruby-time-test
Fix the order of "expected" and "actual" in `mruby-time` test
2019-05-25 00:12:53 +09:00
KOBAYASHI Shuji 240bbc39e1 Fix the order of "expected" and "actual" in mruby-time test 2019-05-24 21:02:22 +09:00
Yukihiro "Matz" Matsumoto 43a26aa958 Merge pull request #4463 from shuujii/freeze-Rational-and-Complex-objects
Freeze `Rational` and `Complex` objects
2019-05-23 19:54:45 +09:00
KOBAYASHI Shuji 48903850e9 Freeze Rational and Complex objects 2019-05-23 13:40:49 +09:00
Yukihiro "Matz" Matsumoto 5f4eb87735 Merge pull request #4462 from shuujii/kernel-Rational-requires-numerator
`Kernel#Rational` requires numerator
2019-05-22 20:17:11 +09:00
KOBAYASHI Shuji 8513abd404 Kernel#Rational requires numerator 2019-05-22 19:57:35 +09:00
Yukihiro "Matz" Matsumoto 85a2dfc841 Merge pull request #4403 from dearblue/read-irep-from-buf
Read irep from buffers
2019-05-22 08:58:50 +09:00
Yukihiro "Matz" Matsumoto 38f8edbdd7 Update ISO section number for some Numeric methods. 2019-05-21 21:12:33 +09:00
Yukihiro "Matz" Matsumoto c02e63eb77 Use MRB_TT_ISTRUCT for Complex numbers if possible. 2019-05-21 21:08:26 +09:00
Yukihiro "Matz" Matsumoto fccec8964a Implements part of Complex class in C. 2019-05-21 21:08:26 +09:00
Yukihiro "Matz" Matsumoto e941cf06a3 Export mrb_int_value that converts mrb_float to Fixnum.
Or `Float` if `mrb_float` value is too big (or too small) to fit in
`mrb_int`. The `_int_` in `mrb_int_value` means `Integral` module, which
represents integer-like values in mruby.
2019-05-21 21:08:26 +09:00