Yukihiro "Matz" Matsumoto
ac88f85a9e
Copy mrb_float values from pool when MRB_WORD_BOXING; ref #3396
2017-01-25 11:09:15 +09:00
Yukihiro "Matz" Matsumoto
b3ce364537
Outer class may be same as the class; fix #3382
2017-01-24 17:54:05 +09:00
Yukihiro "Matz" Matsumoto
72bff2932b
Use size_t to avoid integer overflow in mrb_ary_splice(); fix #3413
2017-01-24 11:36:27 +09:00
Yukihiro "Matz" Matsumoto
28cf7a549d
Change return type of mrb_range_beg_len() from int to mrb_int.
...
ref #3411
2017-01-23 22:18:29 +09:00
Yukihiro "Matz" Matsumoto
f0f095bc13
Fix a double free problem in codegen.c; fix #3378
...
This issue was first reported by https://hackerone.com/geeknik
The fix was proposed by @titanous
2017-01-23 16:53:31 +09:00
Yukihiro "Matz" Matsumoto
ffb5e5ab08
The ensure clause should keep its ci after its execution; fix #3406
...
This issue was reported by https://hackerone.com/ston3
2017-01-23 16:44:11 +09:00
Yukihiro "Matz" Matsumoto
324887d0d6
Backtrace list must be an array of strings; fix #3408
2017-01-23 16:23:48 +09:00
Yukihiro "Matz" Matsumoto
28b7b9ec64
Skip non string values in backtraces; ref #3408
2017-01-23 16:22:55 +09:00
ksss
78a395d446
Refactoring: Use array_copy instead of for loop
2017-01-23 15:18:48 +09:00
Yukihiro "Matz" Matsumoto
4d38cad31b
Add MRB_API to mrb_range_beg_len(); ref #3411
2017-01-23 15:05:12 +09:00
Yukihiro "Matz" Matsumoto
5e1d923381
Changed the behavior of mrb_range_beg_len(); close #3411
...
The new API is:
int mrb_range_beg_len(mrb, range, &beg, &len, len, trunc)
The new argument `trunc` is a boolean value that specifies
whether the function truncates the range. The new return value
is an integer instead of a boolean, that is:
0: not a range
1: range with proper edges
2: out of range
To get the old behavior, you have to rewrite:
mrb_range_beg_len(mrb, range, &beg, &len, len)
to:
mrn_range_beg_len(mrb, range, &beg, &len, len, TRUE) == 1
[Breaking Change]
2017-01-23 14:35:26 +09:00
Yukihiro "Matz" Matsumoto
708088c5fa
Should not make empty strings shared; fix #3407
2017-01-23 10:52:40 +09:00
Yukihiro "Matz" Matsumoto
49fd7590df
Use mrb_write_barrier() instead of mrb_field_write_barrier_value()
...
ref #3409
2017-01-23 10:32:33 +09:00
Yukihiro "Matz" Matsumoto
fdec607cd0
Remove unnecessary inline declaration; ref #3409
2017-01-23 10:30:14 +09:00
Yukihiro "Matz" Matsumoto
9d0f07e6a7
Merge pull request #3409 from ksss/mrb_ary_splice
...
Rewrite mrb_ary_splice
2017-01-23 10:28:09 +09:00
ksss
b49bd70f59
Should raise RuntimeError when object frozen
2017-01-22 18:53:20 +09:00
ksss
65c9baae7c
Rewrite mrb_ary_splice
...
Referenced to CRuby's array.c(rb_ary_splice)
fix #3405
2017-01-22 14:06:23 +09:00
Yukihiro "Matz" Matsumoto
c48aef0b65
Stack position may be bigger than stack bottom; fix #3401
...
This issue was reported by https://hackerone.com/titanous
2017-01-21 18:01:12 +09:00
Yukihiro "Matz" Matsumoto
fe0e45505b
Initialize callinfo->acc; ref #3243
2017-01-18 17:53:08 +09:00
Yukihiro "Matz" Matsumoto
c8536d977d
Merge pull request #3362 from ksss/proc
...
Proc shouldn't have `initialize` method
2017-01-18 00:09:26 +09:00
Yukihiro "Matz" Matsumoto
8d61f2120c
Add proper given argument number in the wrong-number-argument error.
2017-01-12 23:14:35 +09:00
Yukihiro "Matz" Matsumoto
a3571240e5
Add proper stack size calculation; fix #3398
...
This issue was reported by https://hackerone.com/ssarong
2017-01-12 23:08:58 +09:00
Yukihiro "Matz" Matsumoto
38acb9ec36
Kernel#initialize should not break existing mt; fix #3397
...
This issue was reported by https://hackerone.com/icanthack
The solution is suggested by @clayton-shopify.
2017-01-12 21:43:23 +09:00
Yukihiro "Matz" Matsumoto
41eff635bf
Merge pull request #3393 from clayton-shopify/fix-exc-initialize
...
Fix broken MRB_INT64
2017-01-12 15:31:32 +09:00
Bouke van der Bijl
6be5160eb6
Fix 36fc1f14 not checking in the right location
2017-01-11 09:10:12 -05:00
Clayton Smith
bc4c90de07
Use mrb_int for argc.
2017-01-11 09:05:02 -05:00
Yukihiro "Matz" Matsumoto
db1bd078be
Use temporary variable to avoid potential crash; fix #3387
...
This issue was original reported by https://hackerone.com/icanthack
https://hackerone.com/titanous suggested the solution.
`regs` may be reallocated in the function call.
2017-01-11 17:59:56 +09:00
Yukihiro "Matz" Matsumoto
e1ff71029f
String#replace should check replacing string; fix #3374
...
This issue was reported by https://hackerone.com/tunz
2017-01-11 17:51:11 +09:00
Yukihiro "Matz" Matsumoto
06b2e6a76c
Check if ci->target_class is NULL before dereferencing
...
close #3389
This issue was reported by https://hackerone.com/ston3
2017-01-11 11:30:52 +09:00
Yukihiro "Matz" Matsumoto
44edc51612
Raises Exception if raising exception class is redefined
...
close #3384
This issue was reported by https://hackerone.com/brakhane
2017-01-11 10:29:55 +09:00
Yukihiro "Matz" Matsumoto
7523cdf340
Exception#initialize to take arbitrary number of args; ref #3384
2017-01-11 10:29:55 +09:00
Yukihiro "Matz" Matsumoto
392d7fbef9
Add ary_modify() checks; close #3379
...
This issue was reported by https://hackerone.com/an0n-j
2017-01-07 12:26:29 +09:00
Yukihiro "Matz" Matsumoto
8c11b04d5c
Merge pull request #3377 from ksss/respond_to
...
Check intern object returned by mrb_check_string_type
2017-01-06 18:56:39 +09:00
ksss
ddcb30d84b
Check intern object returned by mrb_check_string_type
2017-01-06 16:27:19 +09:00
Yukihiro "Matz" Matsumoto
885d929398
Improve capacity enhancing conditions
2017-01-06 14:53:00 +09:00
Yukihiro "Matz" Matsumoto
c6a1172592
Add pointer cast to pacify warnings.
2017-01-06 14:52:04 +09:00
Yukihiro "Matz" Matsumoto
9a76a0bd80
Move mrb_assert() position.
2017-01-06 14:51:21 +09:00
Yukihiro "Matz" Matsumoto
f53f73f30c
Should not deallocate shared string referring static; fix #3373
2017-01-06 14:25:01 +09:00
Yukihiro "Matz" Matsumoto
36f5b44578
Add new method Kernel#frozen?; ref #3370
2017-01-05 17:49:21 +09:00
Yukihiro "Matz" Matsumoto
2e0c2b5807
Add mrb_hash_modify() to Hash#{delete,clear}; ref #3370
...
This issue was reported by https://hackerone.com/an0n-j
2017-01-05 16:46:08 +09:00
Yukihiro "Matz" Matsumoto
f388b6d612
use size_t instead of int
2017-01-02 17:48:44 +09:00
ksss
8a9a24152a
Fix memory error on str_buf_cat
...
Modify from nofree to embed string
2017-01-02 17:32:44 +09:00
ksss
30b6648b9c
Small refactoring: should use RSTR_CAPA
2017-01-02 16:33:58 +09:00
Yukihiro "Matz" Matsumoto
8b77979667
Initialize potentially uninitialized variable z
2017-01-01 00:45:14 +09:00
Yukihiro "Matz" Matsumoto
1ed4de58d0
str_buf_cat(): better size check added; ref #3342
2016-12-31 23:33:34 +09:00
Yukihiro "Matz" Matsumoto
342b1de65c
str_buf_cat(): should allocate at least RSTRING_EMBED_LEN_MAX+1.
2016-12-31 23:31:45 +09:00
Yukihiro "Matz" Matsumoto
cfdd1e3cc6
ary_expand_capa(): refine conditions to avoid infinite loop; ref #3353
2016-12-31 23:22:17 +09:00
Yukihiro "Matz" Matsumoto
9d84f0d47b
ary_expand_capa(): size calculation by size_t; fix #3353
...
Also more size checks added.
2016-12-31 23:09:56 +09:00
Yukihiro "Matz" Matsumoto
270ea41b37
method_missing() may have CALL_MAXARGS-1 arguments; fix #3351
...
The issue was reported by https://hackerone.com/ston3
2016-12-30 22:09:32 +09:00
Yukihiro "Matz" Matsumoto
6af8cc36b9
Merge pull request #3366 from ksss/splice
...
Check array max size
2016-12-28 13:00:14 +09:00