Commit Graph

8266 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto aa3cb0466e Avoid C undefined behavior of division by zero; close #3745 2017-07-19 09:49:41 +09:00
Yukihiro "Matz" Matsumoto ca2cfc6fe9 Merge pull request #3746 from christopheraue/mod_singleton_class_p
Implemented Module#singleton_class?
2017-07-19 09:08:11 +09:00
Yukihiro "Matz" Matsumoto 645b0fb58c Merge branch 'christopheraue-const_set_mod_to_s' 2017-07-19 09:03:51 +09:00
Yukihiro "Matz" Matsumoto 14a72b0800 Avoid constant-set duplication; ref #3747 2017-07-19 09:03:07 +09:00
Yukihiro "Matz" Matsumoto a8bffdae50 Merge branch 'const_set_mod_to_s' of https://github.com/christopheraue/mruby into christopheraue-const_set_mod_to_s 2017-07-19 08:58:06 +09:00
Christopher Aue 468cc34c93 Fixed Module#to_s and #name for #const_set modules 2017-07-18 22:55:37 +02:00
Christopher Aue dd52b88101 implemented Module#singleton_class? 2017-07-18 20:47:05 +02:00
Yukihiro "Matz" Matsumoto 329938ef15 Simplify mrb_gc_arena_restore() to reduce overhead.
It will no longer shrink arena region. Instead `vm.c` uses
a static function `mrb_gc_arena_shrink()` to shrink.
2017-07-18 23:26:36 +09:00
Yukihiro "Matz" Matsumoto 52aafcd001 Merge pull request #3743 from christopheraue/sprintf_d_tests
added tests for #3736
2017-07-17 09:17:24 +09:00
Yukihiro "Matz" Matsumoto 59eaad9d78 Merge pull request #3742 from christopheraue/iter_exp_tests
added basic tests for while/until/break/next
2017-07-17 09:16:25 +09:00
Christopher Aue 2730231e50 added tests for #3736 2017-07-16 22:34:23 +02:00
Christopher Aue 8fe2a6ce0f added basic tests for while/until/break/next 2017-07-16 22:25:48 +02:00
Yukihiro "Matz" Matsumoto 515a093213 Add Hash#transform_keys! and Hash#transform_values. 2017-07-15 08:51:35 +09:00
Yukihiro "Matz" Matsumoto d7fef24a95 Use keys.each instead of unstable each_keys. 2017-07-15 08:50:52 +09:00
Yukihiro "Matz" Matsumoto 460d628490 Remove duplication in mruby-hash-ext test. 2017-07-14 16:10:26 +09:00
Yukihiro "Matz" Matsumoto 1c02b8558f Avoid duplicated width filling for sprintf %d specifier; fix #3736 2017-07-14 15:21:11 +09:00
Yukihiro "Matz" Matsumoto de3edcc170 Add Hash#transform_{keys,values} to mruby-hash-ext. 2017-07-14 15:13:41 +09:00
Yukihiro "Matz" Matsumoto bad807e7f0 Use floor() to implement round() on WIN32 platform.
This change was suggested by Akira Kakuto.
2017-07-13 20:32:34 +09:00
Yukihiro "Matz" Matsumoto 70e99d6b57 Define round() only on WIN32 platform; fix #3741 2017-07-13 00:09:31 +09:00
Yukihiro "Matz" Matsumoto 7fa9321c18 while|until should have the value from break; fix #3735 2017-07-12 14:56:48 +09:00
Yukihiro "Matz" Matsumoto e5fbe350b3 Avoid float operation to shrink arena buffer size. 2017-07-12 14:52:03 +09:00
Yukihiro "Matz" Matsumoto 9501b18362 Add inline modifier to cipush() and cipop() functions. 2017-07-12 14:50:44 +09:00
Yukihiro "Matz" Matsumoto a18904a4c2 Use "$!" specifier of mrb_get_args. 2017-07-12 14:49:55 +09:00
Yukihiro "Matz" Matsumoto e9b57124a0 Update mrb_get_args() document. 2017-07-12 14:49:06 +09:00
Yukihiro "Matz" Matsumoto adf453a584 Add "*!" argument specifier to avoid stack copying. 2017-07-12 14:48:23 +09:00
Yukihiro "Matz" Matsumoto 059d707e3a Add ary_modify_check() to Array#unshift; ref #3737 2017-07-12 14:44:36 +09:00
Yukihiro "Matz" Matsumoto e1de86134d Merge pull request #3740 from christopheraue/fix_test_output
fixed printing failed assertions
2017-07-12 08:24:02 +09:00
Christopher Aue 495a2e605d fixed printing failed assertions 2017-07-11 12:53:48 +02:00
Yukihiro "Matz" Matsumoto fc666bfe20 POSFIXABLE and NEGFIXABLE should take one argument. 2017-07-11 09:02:24 +09:00
Yukihiro "Matz" Matsumoto 46dee5716f Resurrect POSFIXABLE and NEGFIXABLE; ref 9186828 2017-07-10 09:42:48 +09:00
Yukihiro "Matz" Matsumoto 01fce3dc35 Merge pull request #3739 from ksss/array-shift
Should only check frozen fix #3737
2017-07-09 19:58:11 +09:00
ksss bf48473cf6 Should only check frozen for Array#pop 2017-07-09 18:05:21 +09:00
ksss c76dc33116 Add frozen test for Array#shift 2017-07-09 17:53:12 +09:00
ksss e581f2ed97 Should only check frozen fix #3737 2017-07-09 17:47:10 +09:00
Yukihiro "Matz" Matsumoto ce6c05600a Add fallback definitions of DBL_EPSILPN and LDBL_EPSILON; fix #3733
This is a workaround for mingw-w64 (5.3.1) bug.
2017-07-07 22:47:49 +09:00
Yukihiro "Matz" Matsumoto 718a9ceb6e Reduce allocation size of backtrace arrays. 2017-07-06 09:33:53 +09:00
Yukihiro "Matz" Matsumoto 542f0f7b16 Avoid out-of-bounds access of the backtrace array. 2017-07-06 09:32:28 +09:00
Yukihiro "Matz" Matsumoto 91868286be FIXABLE_FLOAT() fails sometimes in MRB_INT64 environment. 2017-07-06 09:05:46 +09:00
Yukihiro "Matz" Matsumoto cc04f03393 print("%d", 0) should not print -0; fix #3731 2017-07-05 23:31:50 +09:00
Yukihiro "Matz" Matsumoto 2ef5d22b60 Put a space between error position and error message.
For readability's sake.
2017-07-05 18:34:27 +09:00
Yukihiro "Matz" Matsumoto b68e7a605c Negation was not a good way to handle negative integers; fix #3729
There's a number that negation does not work (-2147483648 in 32bit
environment).
2017-07-05 18:13:37 +09:00
Yukihiro "Matz" Matsumoto b643a1a8bc In Ruby, sprintf specifier %u should behave as %d; fix #3730
Since there's no unsigned integer in Ruby. Binary, octal and
hexadecimal negative numbers can be represented by using 2's
compliment. But decimal (not being power of 2) cannot be use
that kind of format.
2017-07-05 17:48:40 +09:00
Yukihiro "Matz" Matsumoto bd66c5d716 Check stack size before accessing env stack; fix #3727 2017-07-05 09:19:06 +09:00
Yukihiro "Matz" Matsumoto cc01dedc65 Avoid undefined behavior of left shifting negative integer; #3728 2017-07-05 03:11:39 +09:00
Yukihiro "Matz" Matsumoto c377d504f6 Avoid undefined behavior of signed integer overflow; fix #3728 2017-07-05 03:11:39 +09:00
Yukihiro "Matz" Matsumoto c6bd8ceab7 Merge pull request #3726 from mruby/stable
mruby-1.3.0
2017-07-04 15:46:38 +09:00
Hiroshi Mimaki 277391e1b2 Set the mruby-1.3.0 release date to 2017-7-4. 1.3.0 2017-07-04 09:15:16 +09:00
Yukihiro "Matz" Matsumoto e9cdc88008 Refactor sprintf() code. 2017-07-04 08:50:39 +09:00
Yukihiro "Matz" Matsumoto 31bc2b0009 Initialize flags for each loop. 2017-07-04 08:46:33 +09:00
Hiroshi Mimaki ba1cd56ffa Fixed an unit test to work on Cygwin. 2017-07-03 16:01:01 +09:00