Commit Graph

215 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 3f9450e7b0 Move BasicObject#method_missing to Kernel#method_missing; ref #3417
More compatibility to CRuby.
Updated tests that assume old mruby behavior.
2017-02-15 12:56:27 +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
ksss bd72dba8c0 Kernel#local_variables: Make result array unique 2017-02-06 11:16:47 +09:00
Yukihiro "Matz" Matsumoto bf4e79cc62 argv may be modified when mrb_funcall() is called; fix #3419
Calling `mrb_funcall()` and `mrb_yield()` (and their related
functions) are discouraged unless absolutely necessary, because
it can cause this kind of issues very easily.
2017-02-04 14:10:39 +09:00
Yukihiro "Matz" Matsumoto 8c11b04d5c Merge pull request #3377 from ksss/respond_to
Check intern object returned by mrb_check_string_type
2017-01-06 18:56:39 +09:00
ksss ddcb30d84b Check intern object returned by mrb_check_string_type 2017-01-06 16:27:19 +09:00
Yukihiro "Matz" Matsumoto 36f5b44578 Add new method Kernel#frozen?; ref #3370 2017-01-05 17:49:21 +09:00
ksss 5c1c002ac2 Fix segv when primitive value
Fix #3352
2016-12-25 16:52:10 +09: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
Bouke van der Bijl 73bb30c2f4 Copy over INSTANCE_TT when duping class 2016-11-24 09:52:30 -05:00
Yukihiro "Matz" Matsumoto bfbc6b9ea4 local_variables() should not touch unshared env 2016-11-23 20:50:14 +09: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 c45ed46f28 macro mrb_bool() may evaluate arg multiple times; ref #3228 2016-10-24 01:30:31 +09:00
ksss 022e147b78 Kernel#respond_to? should return true|false only 2016-10-23 18:25:47 +09:00
Yasuhiro Matsumoto 8764bd282c fix public_methods(false) 2016-06-18 01:18:24 +09:00
Yukihiro "Matz" Matsumoto 5c405dea3d include changed from by quotes ("") to by brackets (<>); close #3032 2015-11-27 17:48:23 +09:00
Seba Gamboa e871b77f41 Increasing docs coverage 2015-10-20 12:16:46 -03:00
Yukihiro "Matz" Matsumoto ad1087f5ed should initialize local variable prepended to false 2015-09-23 03:27:10 +09:00
Jun Hiroe dd1fa91a66 Replace 1 with TURE macro 2015-09-18 15:51:49 +09:00
Yukihiro "Matz" Matsumoto 2550edd570 remove origin member to implement prepend from struct RClass; ref #2885
instead origin is saved in ICLASS with MRB_FLAG_IS_ORIGIN set.
2015-09-05 02:01:02 +09:00
Blaž Hrastnik a725cb9093 Include prepended methods in the instance_methods list. 2015-07-13 14:04:43 +02:00
Corey Powell 005cacf18b Additional patches to make this work 2015-07-13 14:04:42 +02:00
Yukihiro "Matz" Matsumoto b6121adc7d singleton_class should not be duped; fix #2815 2015-06-01 21:30:07 +09:00
Yukihiro "Matz" Matsumoto bd2686d82d singleton_class should not be cloned; close #2815 2015-06-01 00:13:12 +09:00
Yukihiro "Matz" Matsumoto 089f1f6c75 block_given? should work with nested block; fix #2695 close #2712 2015-01-31 13:51:25 +09:00
Yukihiro "Matz" Matsumoto 358dd61107 block_given? should return correct value when called in blocks; close #2678
avoid a loop to find parent's callinfo using mrb->c->cibase[env->cioff]
2014-12-19 19:05:27 +09:00
Yukihiro "Matz" Matsumoto 5014bfb50d block_given? should return false on top-level; ref #2678 2014-12-19 18:51:14 +09:00
Yukihiro "Matz" Matsumoto 44c29e88ae block_given did not work with nested block invocation for some cases; fix #2665 2014-12-11 00:36:18 +09:00
Yukihiro "Matz" Matsumoto 69ba4f0ed5 instance_methods etc should not include undef'ed method names; based on a patch from @cremno; fix #2613 2014-10-20 11:11:26 +09:00
Jun Hiroe f7a7426d7e Refactor mrb_obj_is_kind_of_m() in kernel.c 2014-09-02 19:40:29 +09:00
Jun Hiroe 3e40cc6974 Refactor obj_is_instance_of() in kernel.c 2014-09-02 19:40:23 +09:00
Yukihiro "Matz" Matsumoto 6c7b0d88e8 refactor valid instance variable name check 2014-09-02 16:37:40 +09:00
Tatsuhiko Kubo 3202938099 Add a missing space after ",". 2014-08-27 19:13:40 +09:00
Tatsuhiko Kubo 3f685533b8 Remove a discarded comparison.
mrb_method_search() does not return NULL.
Instead it raises an exception.
So it is not necessary to evaluate
a return value of mrb_method_search().
2014-08-21 12:43:20 +09:00
kkkkkt 9da37cdfd1 refactor mruby method(fix indent. remove temporary value, duplicate procedure) 2014-08-18 10:58:48 +09:00
Yukihiro "Matz" Matsumoto 6aa6e75f75 rename obsolete mrb_special_const_p to mrb_immediate_p 2014-08-04 00:50:03 +09:00
Yukihiro "Matz" Matsumoto 206f89e209 add MRB_API modifiers to mruby API functions 2014-08-04 00:47:08 +09:00
take_cheeze 3c96602574 Use MRB_TT_EXCEPTION in exception object. 2014-07-21 23:09:13 +09:00
Yukihiro "Matz" Matsumoto e52533a703 update Kernel#raise/fail argument description 2014-06-05 13:17:29 +09:00
bggd 69c2b8310f Fix invalid array initialize for VS2012 2014-05-28 11:04:28 +09:00
Yukihiro "Matz" Matsumoto c52838cadb Merge pull request #2286 from suzukaze/refactor-kernel
Use boolean macro in kernel.c
2014-05-22 01:01:16 +09:00
Yukihiro "Matz" Matsumoto a11f994e01 direct invocation of instance_eval 2014-05-21 18:00:48 +09:00
take_cheeze d8d07a2345 Move Kernel.local_variables to core. 2014-05-19 22:05:02 +09:00
Jun Hiroe 47c964bc18 Use boolean macro in kernel.c 2014-05-18 15:37:01 +09:00
take_cheeze 49cf477688 Fix #2259 . 2014-05-16 19:58:36 +09:00
Yukihiro "Matz" Matsumoto 9f7651fa65 Merge pull request #2234 from suzukaze/refactor
Refactor functions in kernel.c
2014-05-11 17:25:50 +09:00
Jun Hiroe d973bcff0e Refactor mrb_equal_m() 2014-05-11 03:58:07 +09:00
Jun Hiroe 50d9d974e0 Refacotr mrb_obj_not_equal_m() 2014-05-11 03:55:51 +09:00