Commit Graph

299 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 206f89e209 add MRB_API modifiers to mruby API functions 2014-08-04 00:47:08 +09:00
dreamedge 0b8a0f4bb4 add Module#module_function 2014-07-18 09:50:54 +09:00
Yukihiro "Matz" Matsumoto 1dc6a8c872 avoid infinite recursion when error was happened in #inspect; fix #2474 2014-07-17 01:42:03 +09:00
David Turnbull 249f05e7d7 Clean up value.h and mrb_value boxing 2014-07-09 06:32:11 +09:00
ksss 1cced27a79 Proc class define before a first method
mrb_define_method setting mrb->proc_class for method proc
2014-06-15 22:34:46 +09:00
take_cheeze acec9d1ff1 Implement NoMethodError#args. 2014-06-02 22:38:02 +09:00
ksss 7fe34d8f49 Should not call inherited method
when class nothing
2014-05-23 23:56:01 +09:00
Yukihiro "Matz" Matsumoto 9be81e7429 call Class#initialize from Class.new; ref ISO 15.2.3.3.1 2014-05-22 14:44:59 +09:00
Yukihiro "Matz" Matsumoto 00f2144692 allocate object after mrb_get_args() 2014-05-22 14:18:03 +09:00
Yukihiro "Matz" Matsumoto fc557085d8 Merge pull request #2304 from ksss/class-new
Class.new do not call `class_eval'
2014-05-22 14:12:03 +09:00
ksss c28b46bcf6 Class.new do not call `class_eval'
and set self for block argument
2014-05-22 00:00:46 +09:00
ksss 0bd8e48773 Module#initialize set created object
for block argument
2014-05-21 23:09:19 +09:00
Yukihiro "Matz" Matsumoto 74da72409e direct invocation of module_eval; ref #2298 2014-05-21 14:49:06 +09:00
ksss c4a225f0be mrb_include_module support class and module
that not have methods each other
2014-05-19 19:29:33 +09:00
ksss ffbf90bdc8 Implement Module#initialize (15.2.2.4.31) 2014-05-19 19:28:42 +09:00
ksss ef4f29be70 support class define in singleton class 2014-05-18 12:55:35 +00:00
yui-knk 45305686fe Add a space aftre bracket. 2014-05-18 19:40:17 +09:00
Jun Hiroe bcd8980c78 Use boolean macro 2014-05-17 02:08:01 +09:00
ksss 066c2772e8 const_missing error message more detail 2014-05-16 22:26:47 +09:00
Yukihiro "Matz" Matsumoto a5161e76ed Class.constants to take optional argument; close #2133 2014-04-26 23:47:55 +09:00
Yukihiro "Matz" Matsumoto 83c1399af0 eliminate plain int except for a few cases like arena_index 2014-04-25 04:01:57 +09:00
cremno 8271b4ba27 various functions should have internal linkage 2014-04-16 21:26:12 +02:00
Yukihiro "Matz" Matsumoto 5138f62d6b resolve conflict 2014-04-15 10:55:46 +09:00
Takeshi Watanabe 824d3450c5 Qualify argv argument of API const. 2014-04-11 20:38:23 +09:00
Yukihiro "Matz" Matsumoto 93491caec9 revert b45e99 since a bug in khash.h was fixed 2014-04-10 00:57:21 +09:00
Yukihiro "Matz" Matsumoto b45e99b0d5 call kh_get before kh_put to avoid potential key lost; reported by @mirichi 2014-04-09 21:38:29 +09:00
ksss 8d15ef2e89 Use bool macro KHASH_DEFINE and KHASH_DECLARE 2014-04-02 13:38:43 +00:00
Yukihiro "Matz" Matsumoto d7c29322b8 singleton class needs to set __outer__; fixed #1983 2014-03-31 14:12:47 +09:00
Yukihiro "Matz" Matsumoto 514cafe6c3 do not use "to_f" to retrieve floats in mrb_get_args(); close #1965 2014-03-28 11:04:15 +09:00
Daniel Bovensiepen 7ae495cc9c Adapt for Float and Integer 2014-03-27 01:48:07 +08:00
Daniel Bovensiepen c96339769d Adapt TypeError Message for String to Integer Conversion.
MRI:
"str" * "3"
=> TypeError: no implicit conversion of String into Integer

mruby:
"str" * "3"
=> TypeError: String can't be coerced into int
2014-03-27 01:41:31 +08:00
Keita Obo 3faa76851d Prevent accepting String value for mrb_get_args("i")
Accepting String value for mrb_get_args("i")
causes unintentional expression.

  * `"str" * "3"` => `"strstrstr"`

This change prevents String->Integer conversion for mrb_get_args("i")
and fixes above problem.

See also:
https://github.com/mruby/mruby/issues/1903
2014-03-21 21:41:04 +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
Yukihiro "Matz" Matsumoto c476c1b528 symbol length type to be mrb_int 2014-03-15 15:43:40 +09:00
Yukihiro "Matz" Matsumoto 6423011986 remove invocation of strlen() on buffer of strings; with refactoring 2014-03-09 02:35:49 +09:00
Yukihiro "Matz" Matsumoto ee57789c72 Merge pull request #1831 from monaka/pr-make-type-casts-safer
Make type casts safer
2014-03-09 01:28:31 +09:00
Yukihiro "Matz" Matsumoto bd4b59cd04 add "?" specifier to check if preceding optional argument is given 2014-03-09 00:25:59 +09:00
Masaki Muranaka 270d25bf2d Make type casts safer. 2014-03-08 15:53:59 +09:00
ksss 54132e4364 make embed string when create literals 2014-03-06 13:47:51 +00:00
ksss 4070b5987a embed small string
use flags 4 for *this object is embed*
use flags 8~64 for *embed string length*
2014-03-06 13:12:08 +00:00
cubicdaiya 67de10bfcb use C style comments instead of C++ style comments
According to CONTRIBUTING.md,

Don't use C++ style comments

 /* This is the prefered comment style */

Use C++ style comments only for temporary comment e.g. commenting out some code lines.
2014-03-01 03:31:45 +09:00
cubicdaiya bd0244d067 use mrb_str_cat_lit() intead of mrb_str_cat 2014-02-27 22:42:25 +09:00
Yukihiro "Matz" Matsumoto b31a90614d boot_defclass: super may be NULL 2014-02-27 08:21:39 +09:00
Yukihiro "Matz" Matsumoto 0c1c4416e7 avoid recursion when method_missing happened in inspect; fix #1746 2014-02-27 04:23:57 +09:00
cubicdaiya 6db2e080f0 use mrb_intern_lit instead of mrb_intern_cstr for C string literals 2014-02-26 13:48:11 +09:00
take_cheeze 8060478b3c add 'd' format specifier to get data pointer directly from mrb_get_args 2014-02-21 17:29:49 +09:00
take_cheeze 08ea324593 move src/error.h to include/mruby/error.h 2014-02-20 22:41:29 +09:00
Yukihiro "Matz" Matsumoto 4a2c37df93 made mrb_define_class to return existing class, with heavy refactoring 2014-02-08 13:44:31 +09:00
Yukihiro "Matz" Matsumoto 5da7bd3a91 rename mrb_name_class and make it static 2014-02-08 10:20:23 +09:00