Commit Graph

7282 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 34ac707ea3 OP_ASGN vsp may be negative
reported by https://gist.github.com/miura1729/53fbd8af889c289a79108e38635b2378
fix proposed by @miura1729 in
https://github.com/miura1729/mruby/commit/b1b7933f7aa950cfb747b06327a0d0340f3e4ff8
2016-07-25 11:34:55 +09:00
Yukihiro "Matz" Matsumoto 417092360d Fixed crash error when #initialize is redefined for Struct; fix #3177
refactored redundant functions; removed optimized accessors for safety
this fix also close #3178
2016-07-25 10:32:10 +09:00
Yukihiro "Matz" Matsumoto 97283faa16 Merge pull request #3176 from ksss/string-insert
String#insert should be destructive
2016-07-15 01:22:02 +09:00
ksss d83d9cd164 String#insert should be destructive 2016-07-14 21:33:15 +09:00
Yukihiro "Matz" Matsumoto 72b28f1ed6 Merge pull request #3174 from ksss/local-jump-error
Should raise LocalJumpError when no block given
2016-07-14 17:10:54 +09:00
ksss 9dc820590f Should raise LocalJumpError when no block given 2016-07-14 13:03:25 +09:00
Yukihiro "Matz" Matsumoto d4d807b774 relax string length limitation to 64KB; fix #2725 2016-07-13 03:22:15 +09:00
Yukihiro "Matz" Matsumoto 2e74a93112 Merge pull request #3171 from kjunichi/c-has-no-try
C doesn't have try-catch
2016-07-08 12:14:46 +09:00
Junichi Kajiwara f67631afb4 C doesn't have try-catch 2016-07-08 06:30:45 +09:00
Yukihiro "Matz" Matsumoto 0d9aa830aa Merge pull request #3169 from ksss/Wshift-negative-value
Fix warning shift-negative-value
2016-07-02 00:55:00 +09:00
ksss e3bc81e75e Fix warning shift-negative-value 2016-07-01 22:00:55 +09:00
Yukihiro "Matz" Matsumoto 3c406d54be Merge pull request #3166 from yyamano/fix-gc-profile
Fix compilation error with GC_PROFILE.
2016-06-30 14:32:53 +09:00
Yuji Yamano 00faf3d317 Fix compilation error with GC_PROFILE. 2016-06-29 03:57:02 -04:00
Yukihiro "Matz" Matsumoto fa1c1ab487 Merge pull request #3163 from mattn/fix-public_methods
Fix public methods
2016-06-18 11:40:32 +09:00
Yasuhiro Matsumoto 8a15ab0c0c add test for public_methods(false) 2016-06-18 01:21:21 +09:00
Yasuhiro Matsumoto 8764bd282c fix public_methods(false) 2016-06-18 01:18:24 +09:00
Yukihiro "Matz" Matsumoto a8af43f61e Merge pull request #3162 from udzura/patch-1
Update doc, write about add_test_dependency
2016-06-14 19:10:04 +09:00
Uchio KONDO 481aa31f93 Update doc, write about add_test_dependency 2016-06-14 16:37:06 +09:00
Yukihiro "Matz" Matsumoto 09b11850a5 mrb_gc_unregister() to remove one registration; close #3160
when multiple mrb_gc_register() were called for the same object
2016-06-10 10:12:48 +09:00
Yukihiro "Matz" Matsumoto 44de80f76d fix a compiler warning for uninitialized variable 2016-06-10 10:11:58 +09:00
Yukihiro "Matz" Matsumoto 8dde647a51 add temporary workaround for irep memory corruption
need to find out real memory bug that appears in full-debug/mrbtest
2016-06-10 10:04:52 +09:00
Yukihiro "Matz" Matsumoto 6b0299f72b fixed remaining bugs in OP_ASGN stack adjustment; close #3159 2016-05-16 15:36:36 +09:00
Yukihiro "Matz" Matsumoto 29d3a40418 stack adjustment after NODE_OP_ASGN with NODE_CALL was wrong; fix #3159 2016-05-16 01:49:24 +09:00
Yukihiro "Matz" Matsumoto 2e81fee731 parser_dump() to show symbol number for NODE_SYM 2016-05-16 01:49:24 +09:00
Yukihiro "Matz" Matsumoto 5933651ac7 Merge pull request #3157 from cremno/add-mrb_int_mul_overflow
add function for checked mrb_int multiplication
2016-05-11 09:41:19 +09:00
cremno 7453a5dfea use mrb_int_mul_overflow() 2016-05-10 19:12:02 +02:00
cremno 6369374f79 add mrb_int_mul_overflow(); close #3149
- call __builtin_mul_overflow() if it's available
- perform a 64-bit multiplication for 32-bit mrb_int (default)
- otherwise a much slower method is used
2016-05-10 19:10:49 +02:00
Yukihiro "Matz" Matsumoto 0be4b8960e Merge pull request #3156 from cremno/fix-mruby_version-value
fix MRUBY_VERSION value
2016-05-10 10:04:31 +09:00
Yukihiro "Matz" Matsumoto 4fd0cb61d7 Merge pull request #3154 from cremno/improve-checked-mrb_int-arithmetic-implementation
improve checked mrb int arithmetic implementation
2016-05-10 10:04:04 +09:00
Yukihiro "Matz" Matsumoto bc715f9938 Merge pull request #3155 from cremno/fix-3152
fix #3152
2016-05-10 09:18:25 +09:00
cremno bf63cff46e fix MRUBY_VERSION value
RUBY_ENGINE_VERSION and MRUBY_VERSION should refer to the same string.
2016-05-09 17:19:47 +02:00
cremno 309791b3ae raise the error at runtime; fix #3152 2016-05-09 16:57:56 +02:00
cremno 7276e84637 use type-generic checked arithmetic builtins
Version checking is not reliable - especially with Clang.
E.g. Apple's Clang (Xcode) uses different version numbers.
A feature check (__has_builtin) is the recommened way.

Add the MRB_HAVE_TYPE_GENERIC_CHECKED_ARITHMETIC_BUILTINS
macro which may be used in other files.
2016-05-09 16:52:57 +02:00
cremno 39b6a9dafc define macros only if builtins are n/a 2016-05-09 16:34:20 +02:00
Yukihiro "Matz" Matsumoto b4e1889813 Merge pull request #3153 from kou/remove-needless-assignment
Remove needless assignment
2016-05-09 17:35:19 +09:00
Kouhei Sutou 51cc35dc09 Remove needless assignment
d4ee409ae9 should remove this line.
2016-05-09 14:05:51 +09:00
Yukihiro "Matz" Matsumoto ea033526fb Merge pull request #3151 from okkez/use-stack-directly
Use stack directly
2016-04-27 12:14:54 +09:00
Kenji Okimoto d4ee409ae9 Use stack directly
See https://github.com/mruby/mruby/pull/3142#issuecomment-201138873
2016-04-27 10:18:13 +09:00
Yukihiro "Matz" Matsumoto 8f0c1c7d3c mruby-sprintf:fix double negative signs in printf; fix #3148
MRB_INT_MAX does not have corresponding positive integer
2016-04-23 23:50:01 +09:00
Yukihiro "Matz" Matsumoto c5229074bb mruby-sprintf: format specifiers o,u,x,b ignore sign(+); ref #3148 2016-04-23 22:20:11 +09:00
Yukihiro "Matz" Matsumoto e5c2013829 Merge pull request #3147 from ksss/1.8
Avoid Syntax Error on CRuby v1.8
2016-04-16 23:27:15 +09:00
ksss 451523ff02 Avoid Syntax Error on CRuby v1.8
CRuby v1.8 dose not support named capture
2016-04-16 22:39:09 +09:00
Yukihiro "Matz" Matsumoto fa1a17cbc4 Merge pull request #3145 from timoschilling/patch-1
fix syntax highlighting
2016-04-14 00:04:54 +09:00
Timo Schilling 1863f325c0 fix syntax highlighting 2016-04-13 13:41:31 +02:00
Yukihiro "Matz" Matsumoto 8c67e915b4 mruby-eval: instance_eval should keep target_class; close #3141 2016-04-11 14:28:44 +09:00
Yukihiro "Matz" Matsumoto ae5b5ce575 vm.c: mrb_hash_set() may reallocate VM stack; close #3133 2016-04-11 14:11:44 +09:00
Yukihiro "Matz" Matsumoto d97a37eb7b fix possible memory leak in mruby-time gem 2016-04-04 21:58:46 +09:00
Yukihiro "Matz" Matsumoto e1e888e354 fix too much optimization for ||= 2016-04-01 01:22:16 +09:00
Yukihiro "Matz" Matsumoto d098d823de fix duplicated eval in op_asgn
`a` in `a.m += c` or `a[b] += c` should be evaluated only once.
2016-03-30 20:43:57 +09:00
Yukihiro "Matz" Matsumoto 4979b52d61 reduce OP_ARRAY in argument splat 2016-03-30 01:35:11 +09:00