summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2019-04-04Update version and release date.2.0.1Hiroshi Mimaki
`mruby 2.0.1 (2019-4-4)`
2019-04-01Avoid keeping pointers from `mrb_sym2name_len()`; fix #4342Yukihiro "Matz" Matsumoto
The addresses for packed inline symbols reference `mrb->symbuf` that could be overridden by the later call of `mrb_sym2name_len`. Since file names in call stack information are kept as symbols, keeping the address in the C structures could cause problems like #4342. This changes small incompatible changes in function prototypes: * `mrb_parser_get_filename`: return value changed to `mrb_sym`. * `mrb_debug_get_filename`: add `mrb_state*` as a first argument. * `mrb_debug_get_line`: ditto. I believe above functions are almost internal, and no third-party mrbgem use them.
2019-03-31Merge pull request #4351 from shuujii/fix-warning-interpreted-as-argument-prefixYukihiro "Matz" Matsumoto
Fix warning: '*' interpreted as argument prefix
2019-03-31Fix warning: '*' interpreted as argument prefixKOBAYASHI Shuji
2019-03-30Merge pull request #4349 from shuujii/add-pass-and-flunk-to-test-assert.rbYukihiro "Matz" Matsumoto
Add `pass` and `flunk` to `test/assert.rb`
2019-03-30Add `pass` and `flunk` to `test/assert.rb`KOBAYASHI Shuji
2019-03-29Merge pull request #4348 from shuujii/fix-missing-assertions-in-mruby-math-testYukihiro "Matz" Matsumoto
Fix missing assertions in `mruby-math` test
2019-03-29Merge pull request #4347 from iij/include-stdarg-in-mruby-hYukihiro "Matz" Matsumoto
fixes build on OpenBSD.
2019-03-29va_list is defined in stdarg.h.Tomoyuki Sahara
fixes build on OpenBSD.
2019-03-29Fix missing assertions in `mruby-math` testKOBAYASHI Shuji
2019-03-28Use `Mrbtest::FLOAT_TOLERANCE` instead of `Math::TORELANCE`; ref #4345Yukihiro "Matz" Matsumoto
2019-03-28Break loop whem `sum==0` to avoid zero division; ref #4345Yukihiro "Matz" Matsumoto
2019-03-28Use `DBL_EPSILON` instead of `1E-12`; ref #4345Yukihiro "Matz" Matsumoto
2019-03-28Merge pull request #4346 from ↵Yukihiro "Matz" Matsumoto
shuujii/use-mrb_sym2str-in-implementation-of-symbol-to_s Use `mrb_sym2str` in implementation of `Symbol#to_s`
2019-03-28Use `mrb_sym2str` in implementation of `Symbol#to_s`KOBAYASHI Shuji
2019-03-28Fixed mistakes in 92dce05Yukihiro "Matz" Matsumoto
* rename `sym2name` to `sym2name_len`. * `MRB_API` -> `static`
2019-03-27Merge pull request #4344 from shuujii/remove-unused-variable-in-each_backtraceYukihiro "Matz" Matsumoto
Remove unused variable in `each_backtrace()`
2019-03-27Remove unused variable in `each_backtrace()`KOBAYASHI Shuji
2019-03-27Fix another bug related to #4342Yukihiro "Matz" Matsumoto
For short symbols with alpha numeric characters, `mrb_sym2name_len()` returns the same buffer `mrb->symbuf`. Some occasion, we forget the fact that the second call could overwrite the result of first call of the function. We have prepared the static function `sym2name()` which specifies the buffer region for inline packed symbols and use the function in `mrb_sym_to_s`.
2019-03-27Avoid using 'mrb_str_new_static` if a symbol is packed; fix #4342Yukihiro "Matz" Matsumoto
2019-03-27Merge pull request #4343 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-dealing-with-infinity-and-NaN-in-assert_float Fix dealing with infinity and NaN in `test/assert.rb:assert_float`
2019-03-26Fix dealing with infinity and NaN in `test/assert.rb:assert_float`KOBAYASHI Shuji
`assert_float` is always passed when expected value and/or actual value are infinity or NaN. This behavior seems unintentional. Before this patch: assert_float(Float::INFINITY, 1.0) #=> pass assert_float(-Float::INFINITY, 1) #=> pass assert_float(1, 1/0) #=> pass assert_float(1, -1/0) #=> pass assert_float(1.0, Float::NAN) #=> pass assert_float(Float::NAN, 1) #=> pass After this patch: assert_float(Float::INFINITY, 1.0) #=> fail: Expected 1.0 to be Infinity. assert_float(-Float::INFINITY, 1) #=> fail: Expected 1 to be -Infinity. assert_float(1, 1/0) #=> fail: Expected Infinity to be 1. assert_float(1, -1/0) #=> fail: Expected -Infinity to be 1. assert_float(1.0, Float::NAN) #=> fail: Expected NaN to be 1.0. assert_float(Float::NAN, 1) #=> fail: Expected 1 to be NaN.
2019-03-26Fix missing `MRB_API` prefix for functions below; clse #4267Yukihiro "Matz" Matsumoto
Functions to add prototypes to headers: * mrb_ary_splice() * mrb_notimplement() * mrb_vformat() * mrb_cstr_to_dbl() * mrb_cstr_to_inum() Functions to be made `static` (`MRB_API` was not needed): * mrb_mod_module_function() * mrb_obj_hash() * mrb_str_len_to_inum() Functions to remove `MRB_API` from definitions (referenced from within `libmruby`): * mrb_mod_cv_defined() * mrb_mod_cv_get() * mrb_f_send()
2019-03-25Use uppercase version of `ctype` macros e.g. `ISSPACE`; fix #4338Yukihiro "Matz" Matsumoto
2019-03-25Merge pull request #4341 from shuujii/remove-implementation-of-Symbol-eqqYukihiro "Matz" Matsumoto
Remove implementation of `Symbol#===`
2019-03-25Remove implementation of `Symbol#===`KOBAYASHI Shuji
For reducing program size.
2019-03-25Need to check length before packing a symbol; fix #4340Yukihiro "Matz" Matsumoto
2019-03-25Update float test values to avoid precision errors.Yukihiro "Matz" Matsumoto
2019-03-25Avoid infinite binary floating numbers in `float`.Yukihiro "Matz" Matsumoto
2019-03-24Merge pull request #4339 from shuujii/fix-arguments-spec-in-src-proc.cYukihiro "Matz" Matsumoto
Fix arguments spec in `src/proc.c`
2019-03-24Merge pull request #4337 from shuujii/refactor-t_print-for-testYukihiro "Matz" Matsumoto
Refactor `t_print` for test
2019-03-24Fix arguments spec in `src/proc.c`KOBAYASHI Shuji
2019-03-23Refactor `t_print` for testKOBAYASHI Shuji
2019-03-22Merge pull request #4336 from shuujii/simplify-assert_stepYukihiro "Matz" Matsumoto
Simplify `assert_step` in `test/t/numeric.rb`
2019-03-22Simplify `assert_step` in `test/t/numeric.rb`KOBAYASHI Shuji
2019-03-22Merge pull request #4334 from ↵Yukihiro "Matz" Matsumoto
shuujii/remove-redundant-content-in-assertion-failure-message-and-diff Remove redundant content in assertion failure message and diff
2019-03-22Merge pull request #4335 from shuujii/fix-Float-eqlYukihiro "Matz" Matsumoto
Fix `Float#eql?`
2019-03-21Fix `Float#eql?`KOBAYASHI Shuji
2019-03-21Remove redundant content in assertion failure message and diffKOBAYASHI Shuji
Based on minitest RubyGem. Example of before this patch: - Assertion[1] Failed: Expected 1 to be 2 Expected: 2 Actual: 1 - Assertion[2] Failed: Expected [1, 3] to include 2 Collection: [1, 3] Object: 2 Example of after this patch: - Assertion[1] Expected: 2 Actual: 1 - Assertion[2] Expected [1, 3] to include 2.
2019-03-20Merge pull request #4333 from ↵Yukihiro "Matz" Matsumoto
shuujii/use-FrozenError-instead-of-RuntimeError-in-frozen-obj-mod-test Use `FrozenError` instead of `RuntimeError` in frozen object modification test
2019-03-20Merge pull request #4332 from shuujii/use-Rake-instead-of-MiniRake-on-AppVeyorYukihiro "Matz" Matsumoto
Use Rake instead of MiniRake on AppVeyor
2019-03-19Use `FrozenError` instead of `RuntimeError` in frozen object modification testKOBAYASHI Shuji
2019-03-18Use Rake instead of MiniRake on AppVeyorKOBAYASHI Shuji
1. Reduce build time Build time becomes less than half. In MiniRake, a way of using fiber may not be good. 2. Synchronize standard output No synchronized: mrbtest - Embeddable Ruby Test ........................... Total: 1165 (snip) Time: 1.19 seconds bintest - Command Binary Test ..................... Total: 21 (snip) Time: 0.39 seconds mrbtest - Embeddable Ruby Test ........................... Total: 1165 (snip) Skip: 23 Time: 1.15 seconds (snip) >>> Test cxx_abi <<< >>> Bintest host <<< >>> Test host <<< >>> Test full-debug <<< >>> Bintest cxx_abi <<< Synchronized: >>> Test full-debug <<< mrbtest - Embeddable Ruby Test ........................... Total: 1165 (snip) Time: 1.25 seconds >>> Test host <<< mrbtest - Embeddable Ruby Test ........................... Total: 1165 (snip) Time: 1.16 seconds >>> Bintest host <<< bintest - Command Binary Test ..................... Total: 21 (snip) Time: 0.41 seconds >>> Test cxx_abi <<< mrbtest - Embeddable Ruby Test (snip)
2019-03-17Merge pull request #4331 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-class-instance-variable-name-validation Fix class/instance variable name validation
2019-03-17Fix class/instance variable name validationKOBAYASHI Shuji
- `@@?` etc are invalid class variable name. - `@1` etc are invalid instance variable name.
2019-03-16Merge pull request #4330 from shuujii/refine-appveyor.ymlYukihiro "Matz" Matsumoto
Refine `appveyor.yml`
2019-03-16Refine `appveyor.yml`KOBAYASHI Shuji
- Add Visual Studio 2017. - Enable `shallow_clone` for saving build time. - Cache extracted WinFlexBison.
2019-03-15Merge pull request #4329 from shuujii/use-FrozenError-instead-of-RuntimeErrorYukihiro "Matz" Matsumoto
Use `FrozenError` instead of `RuntimeError` in `String#rstrip!`
2019-03-15Use `FrozenError` instead of `RuntimeError` in `String#rstrip!`KOBAYASHI Shuji
2019-03-15Merge pull request #4328 from shuujii/fix-constant-name-validationYukihiro "Matz" Matsumoto
Fix constant name validation