Commit Graph

7593 Commits

Author SHA1 Message Date
Yasuhiro Matsumoto c27dbfedf4 disable define const on VS 2016-12-08 15:56:50 +09:00
Yasuhiro Matsumoto eda6c1dc05 fix build on vs2013-vs2015 2016-12-08 15:38:19 +09:00
Yukihiro "Matz" Matsumoto 0d38ede33b Merge pull request #3333 from kazuho/kazuho/mrb_gc_unregister
fix issues of mrb_gc_unregister introduced in 09b1185
2016-12-08 12:50:39 +09:00
Kazuho Oku c2e749f878 fix issues of mrb_gc_unregister introduced in 09b1185
* fixes partial copy of objects in GC root array (due to missing `* sizeof(mrb_value)`)
* restores the behavior that permitted an unregistered object to be used as an argument
2016-12-08 10:27:07 +09:00
Yukihiro "Matz" Matsumoto 5930a6ebc7 Merge pull request #3328 from shugo/hash-dup-default_proc
Copy default_proc by Hash#dup.
2016-12-08 01:04:25 +09:00
Yukihiro "Matz" Matsumoto edf26d4043 Merge pull request #3327 from AltimitSystems/errno.macro
Removed the errno declaration from string.c
2016-12-08 01:02:27 +09:00
Felix Jones fe86cf4c91 Removed the errno declaration from string.c 2016-12-07 14:17:09 +00:00
Shugo Maeda 338e0ff52d Copy default_proc by Hash#dup. 2016-12-07 22:39:20 +09:00
Felix Jones 6187c21bd9 Wrapped string.c errno with ifndef macro for platforms that use inbuilt errno macro 2016-12-07 12:46:47 +00:00
Yukihiro "Matz" Matsumoto 2b0dd1f481 Merge pull request #3325 from kazuho/kazuho/detect-64bit
set `MRB_64BIT` if the sizeof(size_t) is 8
2016-12-07 20:15:36 +09:00
Kazuho Oku b491f4b06a set MRB_64BIT if the sizeof(size_t) is 8 2016-12-07 15:31:32 +09:00
Yukihiro "Matz" Matsumoto dffb4d82dc Add type check for cls before allocation 2016-12-06 11:40:49 +09:00
Yukihiro "Matz" Matsumoto 3623a833a4 Protect exceptions within main() function 2016-12-06 11:23:23 +09:00
Yukihiro "Matz" Matsumoto 9a962ed2c3 Raise an exception in time_update_datetime().
The function used to return NULL on error, but not checked in the
caller site.
2016-12-06 10:27:35 +09:00
Yukihiro "Matz" Matsumoto 6ec14a2173 Merge pull request #3318 from bouk/splat-stack
Fix stack move segfaulting in OP_ARYCAT
2016-12-05 16:51:46 +09:00
Yukihiro "Matz" Matsumoto 43512cc7bd Reorganize heredoc rules; fix #3273
The following codes used to be SyntaxError:

(1)
  a = <<-EOD;
  hello
  EOD

(2)
  <<-EOD.bla begin
  k
  EOD
  end
2016-12-05 02:55:39 +09:00
Yukihiro "Matz" Matsumoto ac561a52f5 Add symbol type check for Module#undef_method 2016-12-04 10:41:01 +09:00
Yukihiro "Matz" Matsumoto 5c651d6ce9 add MRB_API to mrb_float_read(); ref #3270 2016-12-03 18:55:52 +09:00
Yukihiro "Matz" Matsumoto a0fbc46ccd Import locale insensitive strtod() from Ruby1.8; fix #3270
The function was renamed to `mrb_float_read(const char*, char**)`.
2016-12-03 18:47:04 +09:00
Yukihiro "Matz" Matsumoto 802e396466 Merge branch 'bouk-method-missing-segfault' 2016-12-03 18:23:25 +09:00
Yukihiro "Matz" Matsumoto 144006a20e update NoMethodError tests; ref #3291 2016-12-03 18:23:04 +09:00
Yukihiro "Matz" Matsumoto 8f510be211 Merge branch 'method-missing-segfault' of https://github.com/bouk/mruby into bouk-method-missing-segfault 2016-12-03 18:20:29 +09:00
Yukihiro "Matz" Matsumoto f6d199919d Needed to apply block from safe-navigation operators; fix #3310 2016-12-03 16:38:43 +09:00
Yukihiro "Matz" Matsumoto 6b84ff4a44 Print NODE_SCALL (&.) from mrb_parser_dump() 2016-12-03 16:21:15 +09:00
Yukihiro "Matz" Matsumoto c029c6c444 codegen: avoid unnecessary OP_MOVE after CASE 2016-12-03 14:50:36 +09:00
Yukihiro "Matz" Matsumoto 23c4ad0865 Merge pull request #3319 from bouk/apost-splatt
Fix segfault when using result of rest assignment
2016-12-03 12:53:21 +09:00
Yukihiro "Matz" Matsumoto 79a621dd73 Check before retrieving struct RRange pointer; fix #3320
range->edges may be NULL for example when #initialize_copy removed.
2016-12-03 12:30:01 +09:00
Yukihiro "Matz" Matsumoto 9776150263 Merge pull request #3317 from bouk/missing-to-s
Use mrb_ptr instead of mrb_cptr in Kernel#to_s
2016-12-03 12:01:43 +09:00
Yukihiro "Matz" Matsumoto d89cfca02c Merge pull request #3315 from ksss/enumerator-with_index
Fix some incompatibility for Enumerator#with_index
2016-12-03 11:58:39 +09:00
Yukihiro "Matz" Matsumoto e673fbb35a Merge pull request #3321 from clayton-shopify/fix-proc-crash-upstream
Fix segfault in mrb_proc_copy.
2016-12-03 11:54:22 +09:00
Yukihiro "Matz" Matsumoto d7589b10ed Merge pull request #3316 from clayton-shopify/fix-array-size-3
Fix more integer overflows.
2016-12-03 11:52:52 +09:00
Clayton Smith 1ff4b3f800 Fix segfault in mrb_proc_copy. 2016-12-02 09:36:26 -05:00
Bouke van der Bijl fe362c1f26 Fix segfault when using result of rest assignment
Reported by https://hackerone.com/haquaman
2016-12-01 15:49:36 -05:00
Bouke van der Bijl 9c61e1cd87 Use mrb_ptr instead of mrb_cptr in Kernel#to_s
This is to avoid segfault when WORD_BOXING is enabled

Reported by https://hackerone.com/brakhane
2016-12-01 15:23:56 -05:00
Bouke van der Bijl 7d07466b43 Fix stack move segfaulting in OP_ARYCAT
Reported by https://hackerone.com/haquaman

Testcase (couldn't get it to work as a test):

def nil.b
  b *nil
end
nil.b
2016-12-01 15:23:31 -05:00
Clayton Smith 2bc3a5fb78 Fix more integer overflows. 2016-12-01 09:08:38 -05:00
Yukihiro "Matz" Matsumoto 2cca9d3688 avoid comparison between signed and unsigned integer; ref #3312 2016-12-01 18:49:39 +09:00
Yukihiro "Matz" Matsumoto f1cf6ef817 Merge pull request #3312 from nobu/feature/multi-unicode-escape
Feature/multi unicode escape
2016-12-01 18:42:40 +09:00
Yukihiro "Matz" Matsumoto 4d807fc619 Merge pull request #3313 from yhara/add-test
Add test for recently fixed bugs
2016-12-01 18:41:23 +09:00
Yukihiro "Matz" Matsumoto ab4ab7c8a0 Fix compile error by #3309 2016-12-01 18:37:03 +09:00
Nobuyoshi Nakada 0f08914ac0 Support multiple elements \u syntax 2016-12-01 16:48:43 +09:00
Nobuyoshi Nakada fed40b44b8 Extract read_escape_unicode from read_escape 2016-12-01 16:48:43 +09:00
Nobuyoshi Nakada bd9bc7786f Fix assertion argument orders 2016-12-01 16:48:43 +09:00
Nobuyoshi Nakada e4086d4014 Fix compile error by #3309 2016-12-01 16:46:59 +09:00
ksss 2718fed124 Support svalue 2016-12-01 16:13:24 +09:00
ksss 0f774ff4df Support nil argument as no argument 2016-12-01 15:33:27 +09:00
Yutaka HARA 3f83ec64a8 Add test for recently fixed bugs 2016-12-01 14:55:26 +09:00
Yukihiro "Matz" Matsumoto 61ac564c99 Merge pull request #3309 from clayton-shopify/fix-array-size-2
Prevent array size calculation overflows.
2016-12-01 11:46:57 +09:00
Yukihiro "Matz" Matsumoto c37c255f19 Merge pull request #3311 from ksss/enum-generator
Support Enumerable methods
2016-12-01 11:46:10 +09:00
ksss 31f0ffeac8 Support Enumerable methods 2016-12-01 10:42:57 +09:00