21 Commits

Author SHA1 Message Date
KOBAYASHI Shuji 3b9b326d3c Remove redundant colon in Proc#inspect (mruby-proc-ext)
Before this patch:

  $ bin/mruby -e 'p proc{}'  #=> #<Proc:0x7fd5eb8206d0@-e::1>

After this patch:

  $ bin/mruby -e 'p proc{}'  #=> #<Proc:0x7fd5eb8206d0@-e:1>
2019-06-11 20:33:07 +09:00
dearblue fc20d0186d Add test for #<< and #>> for Proc and Method class 2019-01-03 18:16:26 +09:00
Tatsuhiko Kubo d2fb4752e2 Add test for Proc#parameters 2018-12-21 12:59:38 +09:00
Yukihiro "Matz" Matsumoto 8f2c62407c Add MRB_METHOD_TABLE_INLINE option.
Now the method tables (in classes/modules and caches) keeps C function
pointers without wrapping in `struct RProc` objects. For the sake of
portability, `mrb_method_t` is represented by the struct and union, but
if the most significant bit of the pointer is not used by the platform,
`mrb_method_t` should be packed in `uintptr_t` to reduce memory usage.

`MRB_METHOD_TABLE_INLINE` is turned on by default for linux.
2017-11-20 18:33:41 +09:00
Christopher Aue 35deaae776 Tested LocalJumpErrors caused by break in a proc 2017-08-30 12:25:55 +02:00
ksss be5c304b4c Fix parameters when noname rest 2017-04-02 23:30:05 +09:00
ksss 3cba13c249 Proc shouldn't have initialize method
Fix #3356
2016-12-21 15:17:05 +09:00
Francois Chagnon 1ec5994377 Fix calling .arity on Proc with undefined initialize
Reported by @bouk
2016-11-24 10:23:31 -05:00
Yukihiro "Matz" Matsumoto 5c405dea3d include changed from by quotes ("") to by brackets (<>); close #3032 2015-11-27 17:48:23 +09:00
cremno 69b4c1648a Proc#curry should preserve lambdas 2015-06-22 16:35:54 +02:00
ksss 9cafc5e105 Implement Proc#parameters 2014-06-25 16:05:33 +09:00
take_cheeze 2c451dd1fc Use assert_kind_of instead. 2014-05-24 23:18:03 +09:00
take_cheeze d8d07a2345 Move Kernel.local_variables to core. 2014-05-19 22:05:02 +09:00
take_cheeze 0f742392b5 Add ISO index to Kernel.local_variables. 2014-05-18 23:34:56 +09:00
Yukihiro "Matz" Matsumoto 27df1a84bc Kernel.local_variables to list UPVAR as well 2014-05-14 17:38:27 +09:00
take_cheeze 7ea82fedd5 Implement Kernel.local_variables for testing dumped local variables information. 2014-04-29 20:47:50 +09:00
Takeshi Watanabe 6e0c48d758 Fix and add test to Proc#inspect . 2014-04-14 22:01:52 +09:00
take_cheeze bf6b1dfe21 Add API to define cfunc Proc with userdata.
The APIs are defined in mruby-proc-ext so include it before using this API.
See mruby-proc-ext's test code for usage.
This should resolve #1794.
2014-03-31 10:01:17 +09:00
take_cheeze f8270ee59b fix and add test for Proc#source_location 2014-03-06 03:40:41 +09:00
Daniel Bovensiepen 8936965945 Improve test of mruby-proc-ext GEM 2013-08-04 22:41:56 +08:00
h2so5 1a375c6fd4 Add mruby-proc-ext 2013-04-17 22:59:57 +09:00