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
Yukihiro "Matz" Matsumoto
7ba4612956
use mrb_str_new_lit() more widely
2014-02-06 08:54:47 +09:00
cremno
f2a62a74ed
clean up external symbols
...
remove unused and unneeded:
- sysexit_status
- type (a global variable)
add mrb_ prefix to:
- codedump_all
- class_instance_method_list
- parser_dump
make various functions static, incl.:
- yyparse
- make_exception
2014-01-31 01:30:18 +01:00
cremno
aa655b9ee1
remove superfluous includes
...
- reduce compile time by a little bit (full-core: ~0.7s for me)
- thanks to 'include-what-you-use' for some help
- include Standard C header files before any other (coding style)
2014-01-07 17:56:30 +01:00
cremno
edf93c8bd6
use the same error msg as mrb_str_to_cstr/CRuby
...
It's better to have one message for the same error
than two different (although similar worded) ones.
2014-01-02 07:53:53 +01:00
crimsonwoods
370ad6fade
Remove 'mrb_state' field from 'kh_xxx_t' structure.
...
'kh_xxx_t' requires 'mrb_state' to allocate, free, and compute hash value.
But 'mrb_state' should not be held by 'kh_xxx_t' and 'mrb_state' should be
supplied from outside.
2013-12-23 00:33:07 -08:00
take_cheeze
df780ae5e9
add mrb_intern_lit for creating symbol from string literal
2013-12-01 10:38:59 +09:00
Yukihiro "Matz" Matsumoto
9c6398a444
rename mrb_intern2() to mrb_intern(); huge API incompatibility; close #1513
2013-11-29 08:47:28 +09:00
Yukihiro "Matz" Matsumoto
abe6db9454
resolve conflict #1552
2013-10-30 17:28:32 +09:00
Yukihiro "Matz" Matsumoto
888ddf1c84
type check class/module in mrb_get_args(); close #1477
2013-10-30 13:24:55 +09:00
h2so5
12e00f9238
implement Class.new with block
2013-10-30 12:52:26 +09:00
Yukihiro "Matz" Matsumoto
3a668241be
nil/false should not be implicitly converted to integers in mrb_get_args(); close #1529
2013-10-26 17:11:09 +09:00
Yukihiro "Matz" Matsumoto
fcebd1243b
Merge pull request #1530 from h2so5/args-explicit-conversion
...
Disable implicit integer conversion in mrb_get_args
2013-10-26 00:47:03 -07:00
Yukihiro "Matz" Matsumoto
8ecbff3f7b
define Module#const_missing
2013-10-15 11:12:22 +09:00
h2so5
41de3d83e5
Disable implicit integer conversion in mrb_get_args
2013-10-05 10:56:27 +09:00
Yuichi Nishiwaki
0e4a7b2a03
eliminate use of traditional intern API (mrb_intern()) completely
2013-09-23 19:36:50 -07:00
Yukihiro "Matz" Matsumoto
3995e7ff8f
rename voidp to cptr
2013-09-21 17:28:47 +09:00
take_cheeze
d12b6ab218
add verbose_backtrace
2013-09-02 00:48:06 +09:00
Yukihiro "Matz" Matsumoto
26839b9c24
Merge pull request #1487 from h2so5/z-option-with-shared-string
...
Fix a problem of 'z' option and shared string
2013-08-26 00:41:14 -07:00
h2so5
23df879a81
Fix a problem of 'z' option and shared string
2013-08-24 06:52:46 +09:00
Yukihiro "Matz" Matsumoto
65e802f769
remove Class#alloc method
2013-08-15 01:49:37 +09:00
Yukihiro "Matz" Matsumoto
babc8d0086
implement Class.new in C again
2013-08-15 00:35:41 +09:00
Yukihiro "Matz" Matsumoto
6b015ec775
define Class#new in ruby to call #initialize
2013-08-13 16:55:06 +09:00
Yukihiro "Matz" Matsumoto
53f750dbed
def statement and define_method now return symbol a la Ruby2.1
2013-08-09 22:25:45 +09:00
Cremno
123c88759c
class.c and numeric.c: fixed MSVC warnings
2013-08-07 20:48:23 +02:00
Yukihiro "Matz" Matsumoto
a61def802e
return statement should terminate execution of a method defined by define_method
2013-08-07 17:45:24 +09:00
Yukihiro "Matz" Matsumoto
029613bc55
stop storing target_class info for C defined methods
2013-07-31 00:31:37 +09:00