Yukihiro "Matz" Matsumoto
000c68da97
OP_RETRUN to take B as matching exception; ref #3487
2017-03-11 16:32:29 +09:00
Yukihiro "Matz" Matsumoto
4ab70294ea
Revert 642ab8e; ref #3422
...
Also fix #3499 . The issue was solved by #3462 .
2017-03-11 16:03:04 +09:00
Yukihiro "Matz" Matsumoto
94395e81c1
The width printf specifier may be negative; fix #3498
2017-03-11 15:22:54 +09:00
Yukihiro "Matz" Matsumoto
f30ec2dfb0
fixup! Check return value from snprintf(); ref #3498
2017-03-11 15:22:42 +09:00
Yukihiro "Matz" Matsumoto
e3922318bd
Check return value from snprintf(); ref #3498
2017-03-11 15:18:41 +09:00
Yukihiro "Matz" Matsumoto
f9ed15d899
Merge pull request #3496 from ksss/string-gsub
...
Avoid infinity loop when empty string pattern
2017-03-11 10:22:34 +09:00
Yukihiro "Matz" Matsumoto
7590482d48
Merge branch 'master' into string-gsub
2017-03-11 10:22:17 +09:00
Yukihiro "Matz" Matsumoto
431f474ba3
Merge pull request #3497 from ksss/subreplace
...
\1 sequences as empty strings
2017-03-11 10:19:59 +09:00
ksss
b56ad8d122
\1 sequences as empty strings
2017-03-10 22:22:06 +09:00
ksss
4b3e6cf169
Avoid infinity loop when empty string pattern
2017-03-10 13:26:15 +09:00
Yukihiro "Matz" Matsumoto
ff262f2133
Update ci->mid according to surrounding scope; fix #3490
2017-03-10 12:37:19 +09:00
Yukihiro "Matz" Matsumoto
2f299cf4dc
Simplify expression; ref #3490
2017-03-10 12:36:58 +09:00
Yukihiro "Matz" Matsumoto
e8f09f9393
Raise special Exception when exception class is redefined; fix #3493
2017-03-10 11:43:25 +09:00
Yukihiro "Matz" Matsumoto
c6e5659fec
Use string#upto() if available; fix #3489
...
Terminate loop if the value is longer than the last otherwise.
2017-03-10 10:39:43 +09:00
Yukihiro "Matz" Matsumoto
4763312fb8
Terminate loop if generated string longer than the last; ref #3489
2017-03-10 10:38:28 +09:00
Yukihiro "Matz" Matsumoto
63dbed0094
__FILE__ should not update p->filename; fix #3485
2017-03-07 15:01:09 +09:00
Yukihiro "Matz" Matsumoto
513f4fbf14
Merge pull request #3484 from ksss/string-frozen
...
Check modifiable for String `bang' methods
2017-03-06 07:38:56 +09:00
Yukihiro "Matz" Matsumoto
8a15abdac2
Avoid trampoline code if mrb_f_send is called from funcall; fix #3383
2017-03-06 07:35:41 +09:00
ksss
eba4b1fd76
Check modifiable for String `bang' methods
2017-03-05 23:04:22 +09:00
Yukihiro "Matz" Matsumoto
d050694580
Merge pull request #3483 from ksss/string-index
...
String#index shouldn't return nil when "".index ""
2017-03-05 20:27:28 +09:00
ksss
76e10351fa
String#index shouldn't return nil when "".index ""
2017-03-05 14:15:18 +09:00
Yukihiro "Matz" Matsumoto
4f43db862a
Unshare popped TT_ENV objects.
2017-03-04 22:45:44 +09:00
Yukihiro "Matz" Matsumoto
3b40a2f6b5
Limit ecall() recursion levels; fix #3466
2017-03-04 18:56:20 +09:00
Yukihiro "Matz" Matsumoto
ecee8c51b0
Avoid tracing shared TT_ENV object.
2017-03-04 18:53:36 +09:00
Yukihiro "Matz" Matsumoto
c789acbc36
Save/restore arena index in the loop.
2017-03-04 18:52:51 +09:00
Yukihiro "Matz" Matsumoto
ffdf7be723
Define jmpbuf_id outside of extern "C"; ref #3470
2017-03-02 20:42:06 +09:00
Yukihiro "Matz" Matsumoto
2d858cab3d
Use C++ ABI only when MRB_ENABLE_CXX_ABI is set; ref #3470
2017-03-02 20:37:21 +09:00
Yukihiro "Matz" Matsumoto
1ab7e7e4dc
Fixed a bug in register size calculation; fix #3479
2017-03-02 18:14:36 +09:00
Yukihiro "Matz" Matsumoto
3390020fd0
The method_missing removal condition in a76dc04a was wrong.
2017-03-02 17:59:27 +09:00
Yukihiro "Matz" Matsumoto
27ec2437fd
Fix possible stack overflow for method_missing; fix #3478
...
Instead of shifting mruby VM stack, we always use CALL_MAXARGS.
2017-03-02 17:55:15 +09:00
Yukihiro "Matz" Matsumoto
0bcf9e28fc
Reorganize C++ exceptions; ref #3470
...
There are 3 levels of C++ exception handling:
* default - no C++ exception (use setjmp/longjmp)
* enable_cxx_exception (use C++ exceptions with C ABI)
* enable_cxx_abi (use C++ ABI including exceptions)
2017-03-02 10:58:26 +09:00
Yukihiro "Matz" Matsumoto
fdd92750fe
Create NoMethodError instance using mrb_obj_new().
2017-03-02 10:56:23 +09:00
Yukihiro "Matz" Matsumoto
9b176a1ca8
Avoid using <mruby/throw.h> in mruby.c
2017-03-02 10:51:44 +09:00
Yukihiro "Matz" Matsumoto
eca35df4ff
ci may be moved during mrb_convert_type(); ref #3474
2017-03-01 12:06:18 +09:00
Yukihiro "Matz" Matsumoto
8b089c09f7
Keep space for safe navigation operator; fix #3475
2017-03-01 10:37:43 +09:00
Yukihiro "Matz" Matsumoto
cd0ac59dd3
Newlines in strings should be counted; fix #3477
2017-03-01 00:05:54 +09:00
Yukihiro "Matz" Matsumoto
1a1f834ade
Compile C files by C compiler when C++ files mixed.
...
ref #3267 #3470
By this commit, mruby do not use C++ ABI mode unless
you specify explicitly. It compiles C files by C
compilers, with C++ exception enabled when it sees
C++ files in your configured mrbgems.
I haven't tried visualcpp, so please submit an issue
if you see any problem with C++ gems on Windows.
2017-02-28 23:27:13 +09:00
Yukihiro "Matz" Matsumoto
dc56bbecc8
Ignore empty ensure clause.
2017-02-28 11:51:17 +09:00
Yukihiro "Matz" Matsumoto
fb3243e096
return (and break) should handle splat correctly; fix #3472
2017-02-28 11:34:54 +09:00
Yukihiro "Matz" Matsumoto
22eb41ab20
Fix NODE_DREGX dump; ref #3471
2017-02-28 10:56:34 +09:00
Yukihiro "Matz" Matsumoto
c52bbe1b4e
Fixed a bug in dregex option generation; fix #3471
2017-02-28 10:43:22 +09:00
Yukihiro "Matz" Matsumoto
89eac4f59d
Update codegen.c comments
2017-02-28 10:32:40 +09:00
Yukihiro "Matz" Matsumoto
7db0786abd
Fix integer overflow; fix #3473
...
The fix is suggested by https://hackerone.com/lucnguyen
2017-02-28 09:54:56 +09:00
Yukihiro "Matz" Matsumoto
405f5a2d2a
Add type check by mrb_get_args(); ref #3476
2017-02-28 09:30:06 +09:00
Yukihiro "Matz" Matsumoto
74dbee8e52
Add check before calling str_substr(); ref #3476
2017-02-28 09:21:24 +09:00
Yukihiro "Matz" Matsumoto
bdac7dfae8
Check if the value is fixnum before mrb_funcall(); fix #3476
...
The issue is reported by https://hackerone.com/aerodudrizzt
2017-02-28 09:14:42 +09:00
Yukihiro "Matz" Matsumoto
a76dc04aa8
Remove default Kernel#method_missing.
...
Internal method_missing works without problems.
2017-02-27 23:11:39 +09:00
Yukihiro "Matz" Matsumoto
b563bcb7ff
Check if OP_RETURN cross C function boundary; fix #3462
2017-02-27 20:13:01 +09:00
Yukihiro "Matz" Matsumoto
50bbdbb11b
Fixed ecall() invoked too early; fix #3464
2017-02-27 18:40:35 +09:00
Yukihiro "Matz" Matsumoto
3fc9bf3d5f
Update local variable only after the value is checked.
2017-02-27 18:39:42 +09:00