Yukihiro "Matz" Matsumoto
3bedd22d55
Add assertion to make sure new capacity does not overflow.
2016-12-13 10:50:04 +09:00
Yukihiro "Matz" Matsumoto
3a7c369536
Make sure str->capa is under MRB_INT_MAX; fix #3342
2016-12-13 10:48:36 +09:00
Yukihiro "Matz" Matsumoto
647ad29a7a
Fixed wrong condition in new_sym() that breaks symbol data.
2016-12-13 02:33:28 +09:00
Yukihiro "Matz" Matsumoto
a4ae22ae0c
Failed to realloc irep->syms in certain condition.
...
Also msym size changed to 512 from 256.
2016-12-13 01:55:08 +09:00
Yukihiro "Matz" Matsumoto
9cef265402
should not try to set classpath for frozen classes; ref #3340
2016-12-12 10:34:21 +09:00
Yukihiro "Matz" Matsumoto
6ac5473494
Merge pull request #3341 from kou/support-pkg-config-in-mrbgem-rake
...
Support pkg-config in mrbgem.rake
2016-12-12 01:07:27 +09:00
Yukihiro "Matz" Matsumoto
1164463a7c
freeze classes/modules; ref #3340
2016-12-12 01:05:07 +09:00
Yukihiro "Matz" Matsumoto
761562b65f
freeze instance variables; ref #3340
2016-12-12 01:00:24 +09:00
Yukihiro "Matz" Matsumoto
92c843dd07
rename prefix RBASIC_ to MRB_; ref #3340
2016-12-12 00:54:36 +09:00
Yukihiro "Matz" Matsumoto
1fbad32f8b
Merge pull request #3340 from k0kubun/object-freeze
...
Implement Object#freeze
2016-12-12 00:49:23 +09:00
Kouhei Sutou
237d26fd86
Support pkg-config in mrbgem.rake
...
Example usage:
MRuby::Gem::Specification.new('mruby-onig-regexp') do |spec|
# ...
if spec.search_package('onigmo')
# Use onigmo.h when onigmo.pc exist.
spec.cc.defines += ["HAVE_ONIGMO_H"]
elsif spec.search_package('oniguruma')
# Use oniguruma.h when oniguruma.pc exist.
spec.cc.defines += ["HAVE_ONIGURUMA_H"]
else
# Use bundled Onigmo otherwise.
# ...
end
end
2016-12-11 21:35:56 +09:00
Takashi Kokubun
10bb7ad693
Implement Object#freeze
2016-12-11 03:44:15 +09:00
Yukihiro "Matz" Matsumoto
3cc913490b
Merge pull request #3329 from bouk/reuse
...
Mark all the built-in classes during GC sweep
2016-12-10 16:02:47 +09:00
Yukihiro "Matz" Matsumoto
d93422315c
Merge branch 'bouk-negate'
2016-12-10 15:55:45 +09:00
Yukihiro "Matz" Matsumoto
13979a4376
Merge pull request #3324 from bouk/mruby/bouk-negate
...
Don't generate code for NODE_NEGATE if the result isn't used
Reported by https://hackerone.com/haquaman
2016-12-10 15:52:41 +09:00
Yukihiro "Matz" Matsumoto
0af170fbec
gc.c: dead_slot is boolean; ref #3339
2016-12-10 15:34:32 +09:00
Yukihiro "Matz" Matsumoto
965690c94a
Merge pull request #3339 from kazuho/kazuho/retain-page-with-tt-env
...
do not destroy a page with an active TT_ENV
2016-12-10 15:32:55 +09:00
Kazuho Oku
2ef634edb5
do not destroy a page with an active TT_ENV (e.g. an env referred from TT_FIBER)
2016-12-10 15:11:07 +09:00
Yukihiro "Matz" Matsumoto
7b968ca893
Clear parsing_heredoc at the end of file
2016-12-10 12:35:12 +09:00
Yukihiro "Matz" Matsumoto
8c26efd7ed
Merge pull request #3338 from bouk/break-127
...
Fix segfault in gen_values with NOVAL and more than 127 args
2016-12-10 11:21:54 +09:00
Bouke van der Bijl
1264219832
Fix segfault in gen_values with NOVAL and more than 127 args
2016-12-09 10:30:05 -05:00
Yukihiro "Matz" Matsumoto
c85feaec56
Merge pull request #3337 from bouk/undef-127
...
Fix segfault when undef is called with more than 126 arguments
2016-12-09 16:42:54 +09:00
Bouke van der Bijl
c8da3c4df4
Fix segfault when undef is called with exactly 127 arguments
...
The issue is that when there are more than 126 arguments an array needs
to be created to pass the arguments on with.
Reported by https://hackerone.com/revskills
2016-12-08 15:47:17 -05:00
Yukihiro "Matz" Matsumoto
db6b6ff442
Merge pull request #3336 from AltimitSystems/string.const.macro
...
Removed unnecessary const macro - const keyword is already a dependency
2016-12-09 02:57:03 +09:00
Felix Jones
2827655b9c
Removed unnecessary const macro - const keyword is already a dependency
2016-12-08 12:38:00 +00:00
Yukihiro "Matz" Matsumoto
b84e005fc3
Merge pull request #3335 from mattn/fix-vs2013
...
fix build on vs2013-vs2015
2016-12-08 16:48:08 +09:00
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
bcd91856fd
Merge pull request #3331 from dabroz/feature-load-exec
...
Promote load_exec to mruby API as mrb_load_exec (fixes #3248 )
2016-12-08 15:22:07 +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
Tomasz Dąbrowski
0360a744b5
Promote load_exec to mruby API as mrb_load_exec ( fixes #3248 )
2016-12-07 21:21:21 +01:00
Bouke van der Bijl
d56a19cbf5
Don't generate code for NODE_NEGATE if the result isn't used
...
Reported by https://hackerone.com/haquaman
2016-12-07 15:14:17 -05:00
Bouke van der Bijl
f7a891fa89
Mark all the built-in classes during GC sweep
...
Reported by https://hackerone.com/haquaman
2016-12-07 15:14:12 -05: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