Yukihiro "Matz" Matsumoto
|
5d00e85314
|
Fixed out of bounds access; fix #3572, ref #3553
|
2017-04-02 20:32:11 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
5a445f012e
|
Add alias "append" to Array#push, and "prepend" to Array#unshift.
According to CRuby [Feature#12746]
|
2017-04-01 21:27:23 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
93d802987e
|
Extend VM stack just in case; ref #3551
|
2017-04-01 21:21:57 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
071164b799
|
Should not shrink VM stack; fix #3551
|
2017-04-01 18:54:37 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
56322cd5dd
|
Pacify signed warning; ref #3565
|
2017-04-01 18:41:55 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
dcbfe71625
|
NODE_ASGN arguments may be 127 (CALL_MAXARGS) accidentally; fix #3559
|
2017-04-01 14:11:15 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
e22f37a166
|
Argument order of __case_eqq was wrong; fix #3567
|
2017-04-01 13:42:44 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
1e87dfdf48
|
The stack may be reallocated in the func call; fix #3560
|
2017-04-01 13:20:19 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
8d9d7c929e
|
Improve Time.new() performance using division; fix #3561
|
2017-04-01 13:03:34 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
195af525fb
|
Expand stack for method_missing; fix #3528
|
2017-04-01 12:42:11 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
9eb2ed0879
|
Merge pull request #3571 from keizo042/fix_get_constant_of_module_from_sigleton
Modify to get constant of parent module in singleton class; fix #3568
|
2017-03-31 16:39:21 +09:00 |
|
Kouichi Nakanishi
|
507e00e86f
|
Modify to get constant of parent module in singleton class; fix #3568
|
2017-03-31 13:43:20 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
39ca4ef3bc
|
Avoid crash if hv.n is greater than kh_size(h); fix #3565
The resulting behavior is different from CRuby, but modifying
hash key afterwards is undefined behavior in ISO spec.
|
2017-03-31 13:02:01 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
952207d243
|
small cosmetic change; ref #3570
|
2017-03-30 17:10:44 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
669b18383d
|
Merge pull request #3570 from keizo042/fix_cv_definition_in_singleton
Modify class variable definition in singleton class; fix #3539
|
2017-03-30 17:09:43 +09:00 |
|
Kouichi Nakanishi
|
5efe77fede
|
Modify class variable definition in singleton class; fix #3539
|
2017-03-30 16:29:47 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
898077a2c2
|
Merge pull request #3566 from okkez/fix-enumerator-each-with-index
Fix Enumerator#each_with_index with block
|
2017-03-30 14:49:34 +09:00 |
|
Kenji Okimoto
|
d93a5c1a84
|
Fix Enumerator#each_with_index with block
In previous version,
```
a = [3, 2, 1]
e = a.each
e.sort_by(&:to_i) # => []
```
In this version,
```
a = [3, 2, 1]
e = a.each
e.sort_by(&:to_i) # => [1, 2, 3]
```
|
2017-03-30 10:53:55 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
905f46a129
|
Merge pull request #3558 from ksss/domain
Should raise FloatDomainError
|
2017-03-29 12:50:42 +09:00 |
|
ksss
|
db3573e0bf
|
Should raise FloatDomainError
|
2017-03-29 11:59:19 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
1f6bf0e14f
|
Merge pull request #3563 from clayton-shopify/dup-renumber-keys
Renumber hash keys during dup since there may be duplicates.
|
2017-03-29 09:43:33 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
506c05f01d
|
Merge pull request #3564 from okkez/set-proper-class-to-subclass-of-array
Set proper class to subclass of Array
|
2017-03-29 09:40:44 +09:00 |
|
okkez
|
6dbe2272cf
|
Set proper class to subclass of Array
More compatibility to CRuby.
|
2017-03-29 08:02:21 +09:00 |
|
Clayton Smith
|
a6e25f73a0
|
Renumber hash keys during dup since there may be duplicates.
|
2017-03-28 16:31:19 -04:00 |
|
Yukihiro "Matz" Matsumoto
|
5ec051fc34
|
Avoid inline local variable declarations; fix #3554
|
2017-03-28 18:22:05 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
1bdaf9c840
|
Merge pull request #3553 from okkez/add-array-slice-bang
Implement Array#slice!
|
2017-03-28 15:24:52 +09:00 |
|
Kenji Okimoto
|
33f77fe367
|
Implement Array#slice!
|
2017-03-28 15:07:57 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
0f5289326f
|
Merge pull request #3552 from ksss/time
Fix infinity loop ref #3546
|
2017-03-28 14:47:23 +09:00 |
|
ksss
|
397f1fc946
|
Fix infinity loop
And some cases should raise FloatDomainError
|
2017-03-28 10:58:18 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
66980493ae
|
Merge pull request #3544 from ksss/lineno
Fix lost lineno
|
2017-03-27 11:50:18 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
f688de5803
|
Merge pull request #3545 from keizo042/ignore_tags
Ignore file generated by ctags
|
2017-03-27 11:49:37 +09:00 |
|
Kouichi Nakanishi
|
d0e42eff00
|
Ignore file generated by ctags
|
2017-03-26 12:51:48 +09:00 |
|
ksss
|
b1c5c3b0a5
|
Fix lost lineno
|
2017-03-25 15:56:27 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
051e40c049
|
Use MRB_PRId for NODE_NTH_REF; ref #3530
|
2017-03-23 01:52:52 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
9eb0c11afd
|
Cast to mrb_int to silence a warning; fix #3530
|
2017-03-23 01:20:45 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
41f5c5b2c7
|
Merge pull request #3529 from kou/hash-ext-sub-class
Hash sub class creates new sub class objects instead of Hash
|
2017-03-23 01:14:46 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
8ca9823196
|
Merge pull request #3536 from ksss/string-sub
Fix result if pattern is empty
|
2017-03-23 00:49:06 +09:00 |
|
ksss
|
63c0044b11
|
Fix result if pattern is empty
|
2017-03-22 22:19:34 +09:00 |
|
Kouhei Sutou
|
e72e50b5d5
|
Hash sub class creates new sub class objects instead of Hash
|
2017-03-21 23:25:36 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
3703aed7ab
|
Use snprintf() to stringify fixnum numbers; ref #3492
|
2017-03-20 11:47:15 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
339c6aed64
|
Add explicit cast from float to mrb_int.
|
2017-03-20 02:54:21 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
631de65e0c
|
Merge pull request #3527 from ksss/string-gsub
Update String#gsub and String#gsub!
|
2017-03-20 02:23:11 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
dcf6a413ca
|
Use snprintf() to stringify fixnum numbers; fix #3492
|
2017-03-20 01:39:33 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
cea6a16cf4
|
Fixed some compiler errors regarding PRId.
|
2017-03-19 23:42:49 +09:00 |
|
ksss
|
7a74a617ea
|
Callback should yield with pattern every time
|
2017-03-19 23:04:22 +09:00 |
|
ksss
|
67a6982710
|
Support to return Enumerator for String#gsub,gsub!
|
2017-03-19 22:45:14 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
09574922a9
|
Should not check/call to_str for immediate objects; ref #3515
|
2017-03-19 20:59:30 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
527dcd5247
|
super class error formats the superclass by inspect; rerf #3515
|
2017-03-19 20:58:34 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
ef105b5ca4
|
Use MRB_PRId instead of "%d"; fix #3515
|
2017-03-19 20:43:25 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
4cf38eb903
|
Fixed OP_RESCUE code generation bug; fix #3519
916b8e let code executed with mrb->exc set, and may cause a crash
like #3519. Instead modified OP_RESCUE again. To retrieve the exception
object, we use `OP_RESCUE R(A), 0, 0` (old behavior). To compare the
exception object and the class, we use `OP_RESCUE R(A), R(B), 1`.
The reason we use OP_RESCUE for two instruction switched by operand
C is to save the instruction space.
As a result, the following code:
```ruby
begin
raise "a"
rescue TypeError
p 1
rescue RuntimeError
p 2
end
```
will be compiled as:
```
irep 0x55cd1f565cb0 nregs=4 nlocals=1 pools=1 syms=4 reps=0
file: -
2 000 OP_ONERR 005
2 001 OP_LOADSELF R1
2 002 OP_STRING R2 L(0) ; "a"
2 003 OP_SEND R1 :raise 1
2 004 OP_JMP 023
2 005 OP_RESCUE R1
3 006 OP_GETCONST R2 :TypeError
3 007 OP_RESCUE R1 R2 cont
3 008 OP_JMPIF R2 010
3 009 OP_JMP 014
4 010 OP_LOADSELF R1
4 011 OP_LOADI R2 1
4 012 OP_SEND R1 :p 1
4 013 OP_JMP 024
5 014 OP_GETCONST R2 :RuntimeError
5 015 OP_RESCUE R1 R2 cont
5 016 OP_JMPIF R2 018
5 017 OP_JMP 022
6 018 OP_LOADSELF R1
6 019 OP_LOADI R2 2
6 020 OP_SEND R1 :p 1
6 021 OP_JMP 024
6 022 OP_RAISE R1
6 023 OP_POPERR 1
6 024 OP_STOP
```
|
2017-03-19 18:42:53 +09:00 |
|