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
Yukihiro "Matz" Matsumoto
d219e63a74
Clear block arg when method_missing takes *args.
2017-02-27 18:38:56 +09:00
Yukihiro "Matz" Matsumoto
9e93d5dbf0
Stack may be reallocated in mrb_run(); fix #3465
2017-02-27 16:17:57 +09:00
Yukihiro "Matz" Matsumoto
736be0e98b
Always keep block argument space in stack; fix #3469
2017-02-27 13:05:26 +09:00
Yukihiro "Matz" Matsumoto
83a6c0e0a4
Merge pull request #3458 from dabroz/gitlab-ci
...
GitLab.com tests for multiple configurations
2017-02-27 08:59:33 +09:00
Yukihiro "Matz" Matsumoto
fecbde328a
Merge pull request #3461 from iij/build-with-byacc
...
Build with byacc
2017-02-24 18:39:20 +09:00
Tomoyuki Sahara
da4f8e19fa
replace "yylval" with "pylval" to make it compile with byacc.
2017-02-24 11:47:48 +09:00
Yukihiro "Matz" Matsumoto
a9f7b41219
Merge pull request #3460 from AltimitSystems/android.rake-ndk-clang
...
Additional options for Android build script.
2017-02-17 01:13:37 +09:00
Felix Jones
fd08e0ea3a
Added example build script for Android armeabi-v7a NEON hardware FPU
2017-02-16 15:07:18 +00:00
Felix Jones
324231a733
Android toolchain separated target architecture compile flags (ctarget) from shared compile flags (cflags). Added support for custom mfpu and float-abi switches for the armeabi-v7a target.
2017-02-16 15:02:10 +00:00
Yukihiro "Matz" Matsumoto
73e5a19c39
Configure callinfo target_class as CRuby; ref #3429
2017-02-16 23:43:02 +09:00
Yukihiro "Matz" Matsumoto
4dae285325
Merge pull request #3457 from dabroz/fix-clang-32-64
...
Build fix for 32-bit clang 3.8/3.9 with MRB_INT64
2017-02-16 23:21:58 +09:00
Yukihiro "Matz" Matsumoto
097da2399a
Avoid executing OP_STOP in eval(); fix #3429
2017-02-16 22:40:31 +09:00
Yukihiro "Matz" Matsumoto
5e3c329c98
Adjust callinfo env and target_class; ref #3429
2017-02-16 22:38:47 +09:00
Felix Jones
d83aad8d57
Merge branch 'master' into android.rake-ndk-clang
2017-02-16 13:33:46 +00:00
Tomasz Dabrowski
bc721ec45d
Gitlab tests for multiple configurations
...
Gitlab testing is introduced, using GitLab CI, to test many different configurations:
- 32/64 bit architecture
- float/double
- 16/32/64 bit int size
- none/NaN/word boxing
- ASCII/UTF8
using various compilers:
- gcc-4.7
- gcc-4.8
- gcc-4.9
- gcc-5
- gcc-6
- clang-3.5
- clang-3.6
- clang-3.7
- clang-3.8
- clang-3.9
2017-02-16 13:50:27 +01:00
Tomasz Dabrowski
bd2b76ea85
Build fix for 32-bit clang 3.8/3.9 with MRB_INT64
2017-02-16 13:39:21 +01:00
Yukihiro "Matz" Matsumoto
b165708c8d
Move #instance_exec to Kernel module
...
CRuby defines #instance_exec in BasicObject, but we don't.
It's a small incompatibility that isn't worth accomplish at
the price of implementation complexity.
2017-02-15 13:24:03 +09:00
Yukihiro "Matz" Matsumoto
517e9313bf
Move #__id__ to BasicObject; ref #3417
2017-02-15 13:19:21 +09:00
Yukihiro "Matz" Matsumoto
612d636b77
Move #instance_eval to BasicObject; ref #3417
2017-02-15 13:15:58 +09:00