Yukihiro "Matz" Matsumoto
8efa7b00df
Preallocate SystemStackError; ref #3421
2017-02-15 11:59:47 +09:00
Yukihiro "Matz" Matsumoto
30aa521854
Do not use mrb_funcall() if Hash#default is not overridden; ref #3421
...
This change reduces the recursion level, but does not solve the stack
overflow issue entirely.
2017-02-14 00:22:12 +09:00
Yukihiro "Matz" Matsumoto
51d7a69ab0
Clear (o).w first for MRB_WORD_BOXING; ref #3396
2017-01-25 11:07:57 +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
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
hhc0null
af4f6e8dc6
Fix a typo.
2017-01-12 00:02:17 +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
Daniel Bovensiepen
2c77dfab04
Update Copyright to 2017
...
Signed-off-by: Daniel Bovensiepen <daniel@bovensiepen.net >
2017-01-06 14:27:57 +08:00
Yukihiro "Matz" Matsumoto
92c843dd07
rename prefix RBASIC_ to MRB_; ref #3340
2016-12-12 00:54:36 +09:00
Takashi Kokubun
10bb7ad693
Implement Object#freeze
2016-12-11 03:44:15 +09: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
eda6c1dc05
fix build on vs2013-vs2015
2016-12-08 15:38:19 +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
Kazuho Oku
b491f4b06a
set MRB_64BIT if the sizeof(size_t) is 8
2016-12-07 15:31:32 +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
79a621dd73
Check before retrieving struct RRange pointer; fix #3320
...
range->edges may be NULL for example when #initialize_copy removed.
2016-12-03 12:30:01 +09:00
Yukihiro "Matz" Matsumoto
9fc62d28d0
pre-allocate arena overflow error
2016-11-28 09:52:57 +09:00
Yukihiro "Matz" Matsumoto
5ea1bb0eea
Merge pull request #3301 from dabroz/feature-64-bit-word
...
Safeguard against using MRB_INT64 with MRB_WORD_BOXING in 32-bit mode
2016-11-27 21:00:34 +09:00
Yukihiro "Matz" Matsumoto
f9f19f34dd
replace _cstr by _lit for litral C strings; ref #3300
2016-11-27 20:53:25 +09:00
Tomasz Dabrowski
3fdfd8cb4a
Safeguard against using MRB_INT64 with MRB_WORD_BOXING in 32-bit mode
2016-11-27 12:49:36 +01:00
Herwin Weststrate
afee618c1b
Added documentation on function for globals
2016-11-27 09:50:30 +01:00
Tomasz Dąbrowski
626648dc41
Fixed NaN boxing when MRB_INT16 is set
2016-11-26 13:05:02 +01:00
Tomasz Dąbrowski
be5223371b
Fix typo in istruct.h
2016-11-25 23:15:37 +01:00
Tomasz Dąbrowski
72ed7eebc3
Fixed Range.size to use proper floating point tolerance
2016-11-24 12:50:49 +01:00
Tomasz Dąbrowski
18757c8f7b
Different method of compiling C as C++ (-x c++)
2016-11-24 09:28:00 +09:00
Tomasz Dąbrowski
00e6121260
Safeguard against trying to use C++ exception handling in C code
2016-11-24 09:28:00 +09:00
Tomasz Dąbrowski
1af9e363f2
Fixes for compiling mruby as C++
2016-11-24 09:28:00 +09:00
Tomasz Dąbrowski
52b40cb4d0
Fixed extern "C" to use MRB_BEGIN/END_DECL in re.h
2016-11-22 13:34:40 +01:00
Tomasz Dąbrowski
b21b02465e
asserts checking validity of pointer and TT added for mrb_obj_value
...
Useful for testing when using boxing on different platforms.
2016-11-21 12:37:45 +01:00
Tomasz Dąbrowski
c385782cfe
mrb_assert definition moved to the beggining of mruby.h
...
So that other files can immediately use it.
2016-11-21 12:37:45 +01:00
Tomasz Dąbrowski
8cdaf1ed35
Fixed NaN boxing for 64-bit configrations on platforms that use full 48-bit usermode pointers
...
Definition of boxed pointer is following:
`111111111111TTTT TTPPPPPPPPPPPPPP PPPPPPPPPPPPPPPP PPPPPPPPPPPPPPPP`
Previously, only the last 32-bit were set, and remaining 14 bits were zeroed when setting `ttt`.
2016-11-21 12:37:45 +01:00
Tomasz Dąbrowski
d86f5d2dca
mruby architecture detection
2016-11-21 12:37:45 +01:00
Herwin Weststrate
18d6994f78
Documented most methods in mruby/hash.h
2016-11-17 11:52:28 +01:00
Herwin Weststrate
d20c56c7fa
Documented most methods in mruby/array.h
2016-11-17 11:41:49 +01:00
Herwin Weststrate
c043dc631e
Typo fix: poped => popped
2016-11-17 11:05:27 +01:00
Yukihiro "Matz" Matsumoto
8438792d27
renamed "inline" to "istruct" to represent inline struct; ref #3251
2016-11-17 17:19:49 +09:00
Tomasz Dąbrowski
4cca8bac6b
inline structures data type for mruby (MRB_TT_INLINE) ( fix #3237 )
...
Inline structures have no instance variables, no finalizer, and offer as much space as possible in RBASIC object. This means 24 bytes on 64-bit platforms and 12 bytes on 32-bit platforms.
mruby-inline-struct gem is only provided for testing.
2016-11-17 17:19:49 +09:00
Yukihiro "Matz" Matsumoto
739dad6e87
Fixed a memory problem in Array#to_h
...
Reported from Alex Snaps via Mathieu Leduc-Hamel,
both from shopify.com. Thank you!
2016-11-16 01:29:04 +09:00
Felix Jones
e3c8092ccd
Renamed class_under_defined to class_defined_under
2016-11-10 19:51:56 +00:00
Felix Jones
cc5f40b2db
mrb_class_under_defined docs renamed parent and child to outer and inner
2016-11-06 13:19:14 +00:00
Felix Jones
8d6aa06548
Added mrb_class_under_defined
2016-11-06 13:01:21 +00:00
Nobuyoshi Nakada
6511bfd79a
Removed trailing spaces
2016-09-28 12:29:41 +09:00
Yukihiro "Matz" Matsumoto
afbe211c60
mrb_str_strlen() should be MRB_API; ref #3216
2016-09-27 10:29:56 +09:00
Kazuaki Tanaka
cb29c9b415
Fix return value type of bytecode_decoder
2016-09-20 23:15:49 +00:00
Kazuaki Tanaka
968ebac001
Bytecode decoder support, MRB_BYTECODE_DECODE_OPTION
2016-09-20 23:07:28 +00:00
William Light
e02a88e031
make mrb_hash_values() a public API function
2016-08-01 11:05:46 +02:00
Ralph Desir(Mav7)
189ad47346
yard docs for string.h
2016-07-23 02:47:32 -04:00
Yukihiro "Matz" Matsumoto
d4d807b774
relax string length limitation to 64KB; fix #2725
2016-07-13 03:22:15 +09:00
Junichi Kajiwara
f67631afb4
C doesn't have try-catch
2016-07-08 06:30:45 +09:00