Yukihiro "Matz" Matsumoto
d3a02a297f
Fix instance_exec and class_exec to avoid crash on indirect calls.
...
Thank you @shuujii to additional report on #4973
2020-04-22 16:48:33 +09:00
dearblue
099a4f3969
Entrust "no block given" error to mrb_get_args()
...
Some error messages will be changed.
2019-09-16 20:29:58 +09:00
KOBAYASHI Shuji
2d520eaf6f
Move NilClass#to_h to mruby-object-ext from mruby-enum-ext
2019-07-24 20:13:26 +09:00
KOBAYASHI Shuji
05493e651d
Clarify mruby-(kernel|object)-ext gem summary; ref 8e637bdd [ci skip]
2019-06-06 20:21:40 +09:00
KOBAYASHI Shuji
03fce2e206
Kernel#itself should not be a module function
2019-05-29 15:57:18 +09:00
Yukihiro "Matz" Matsumoto
8170f6899c
Merge pull request #4450 from shuujii/move-Kernel-instance_exec-to-BasicObject
...
Move `Kernel#instance_exec` to `BasicObject`
2019-05-19 22:21:31 +09:00
Yukihiro "Matz" Matsumoto
8e637bdd83
Should clarify the role of mruby-kernel-ext and mruby-object-ext; close #4449
...
The former should contain function like methods, and the latter should
contain methods shared by all objects.
2019-05-19 22:17:56 +09:00
KOBAYASHI Shuji
ef5dd5d31d
Move Kernel#instance_exec to BasicObject
2019-05-18 19:19:52 +09:00
Yukihiro "Matz" Matsumoto
cca19532c5
Remove Kernel#class_defined? which is not available in CRuby; #3829
2019-01-03 11:34:35 +09:00
YAMAMOTO Masaya
9afd376fa4
Support MRB_WIHTOUT_FLOAT to mruby-object-ext
2017-10-16 18:15:25 +09:00
Yukihiro "Matz" Matsumoto
877e16501c
No longer need to copy argv from mrb_get_args; ref #3722
2017-06-27 22:47:26 +09:00
Yukihiro "Matz" Matsumoto
6a0b68f8b8
Use trampoline technique for instance_exec; ref #3359
...
A new function `mrb_yield_cont()` is provided. You have to call it
at the end of a C defined method, e.g. `return mrb_yield_cont()`.
2017-04-19 19:54:55 +09:00
Yukihiro "Matz" Matsumoto
191ee2596c
Need to copy argv since it may be reallocated; fix #3500
...
The argv for `mrb_yield_with_class()` should not be on mruby stack.
Note the result from `mrb_get_args("*")` is on the stack.
2017-03-13 22:51:53 +09: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
Bouke van der Bijl
4523aaec01
Fix segfault when defining class inside instance_exec on primitive
2016-11-24 10:06:15 -05:00
Yukihiro "Matz" Matsumoto
5c405dea3d
include changed from by quotes ("") to by brackets (<>); close #3032
2015-11-27 17:48:23 +09:00
Jun Hiroe
4e4929bc72
Rename extended xxxx class or module to xxxx class or module extension
2015-06-28 11:18:52 +09:00
Jun Hiroe
c69d1201e1
Fix typo; Replace extensional with extended
2015-06-28 00:05:58 +09:00
kkkkkt
d94469ac23
changed to call check_cv_name_str in check_cv_name_sym and adjust indent
2014-08-21 13:56:43 +09:00
take_cheeze
b5028421b9
Use mrb_int in mrbgem rest argument getting.
2014-04-25 22:02:10 +09:00
ksss
d3ea800cba
Implement Object#tap
2014-03-27 19:36:07 +09:00
Yukihiro "Matz" Matsumoto
9084e03556
rename mrb_yield_internal to mrb_yield_with_class since it's no longer internal
2014-03-19 08:57:54 +09:00
Tomoyuki Sahara
93694fe521
export mrb_yield_internal.
2014-03-19 01:08:01 +09:00
take_cheeze
c73f8d4def
move summary of mrbgems in default gembox to its spec
2014-03-17 00:34:24 +09:00
Daniel Bovensiepen
b99aa126a6
Improve test of mruby-object-ext GEM
2013-08-04 22:41:45 +08:00
Jun Hiroe
0804800921
I replace 0 with NULL because struct pointer be should set NULL in.
2013-07-27 13:16:08 +09:00
Tomoyuki Sahara
116f75a8ce
"spec.author" is better for single-author gems.
...
"spec.author=" expects a String represents a single author.
"spec.authors=" expects an Array which is a list of multiple authors.
http://guides.rubygems.org/specification-reference/
2013-07-23 10:09:24 +09:00
h2so5
2117f0973c
Add Object#instance_exec
2013-07-01 16:23:14 +09:00
Akira Yumiyama
36fc42e7db
add nil.to_a, nil.to_f, nil.to_i methods
2013-06-28 10:01:07 +09:00