Yukihiro "Matz" Matsumoto
101ec5eb0a
don't print anonymous struct class name
2015-09-23 12:51:12 +09:00
Yukihiro "Matz" Matsumoto
20a4e9ade6
mruby-struct gem refactoring
2015-09-23 12:13:01 +09:00
Franck Verrot
2588507285
Remove unnecessary backticks.
...
Dr Markus Kuhn published in 1999 an article [1] explaining in details
why we shouldn't use the ASCII grave accent (0x60) as a left quotation.
Backticks have been used most notably to produce nice-looking LaTeX
documents but it doesn't seem to be an issue on modern platforms and
for the oldest ones, there are workarounds as mentioned by Dr Kuhn.
[1]: https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
2015-06-24 13:07:07 +02:00
cremno
2ee84eb3df
remove unnecessary including of <ctype.h>
...
Not needed anymore since 85075bef75
2015-05-28 10:44:20 +02:00
Jun Hiroe
ac131c9052
Remove eql_p variable in mrb_struct_eql func
2015-02-07 01:46:56 +09:00
Jun Hiroe
7dff6ab75a
Remove eql_p variable in mrb_struct_equal func
2015-02-07 01:46:45 +09:00
takahashim
9dff0aedb1
fix Segmentation fault on Struct#inspect due to recursive Struct object
2015-01-12 20:08:53 +09:00
Yukihiro "Matz" Matsumoto
95c7f570e1
change class argument of mrb_const_defined_at from struct RClass* to mrb_value to make it consistent with mrb_const_defined; ref #2593
2014-09-19 02:51:52 +09:00
Yukihiro "Matz" Matsumoto
48c5321dca
constify pointer from RARRAY_PTR to detect potential write barrier bugs.
...
if you see compiler errors due to this commit, you'd better to use array-modifying
functions, e.g. mrb_ary_set() or mrb_ary_push(), otherwise you might see nasty
GC bugs in the future. if you are sure what you are doing, replace `RARRAY_PTR(ary)`
by `mrb_ary_ptr(ary)->ptr`. but be warned.
2014-09-12 12:42:39 +09:00
cremno
fec2c66ea8
get rid of shadowing variables (mrbgems)
...
Mostly renaming, except that the definition of struct accessor methods
is now done in a new function.
2014-09-04 12:31:52 +02:00
take_cheeze
77047b5ed4
Test all ISO defined classes direct superclass except Object class.
...
Move mrbgems ISO direct superclass test to `superclass.rb`.
Skips test if class isn't defined.
Close #2332 .
2014-06-15 17:07:01 +09:00
Yukihiro "Matz" Matsumoto
ccd871bcca
reduce calling mrb_sym2name_len() from struct.c; ref #2365
2014-06-06 09:25:29 +09:00
cremno
025b8f7644
mruby-struct: implement mrb_is_(local|const)_id
2014-06-05 18:48:17 +02:00
cremno
65a7eac1a9
mruby-struct: remove unused functions
2014-06-05 01:31:15 +02:00
cremno
64b0e48dcb
mruby-struct: use correct data types
2014-06-05 01:27:39 +02:00
cremno
0249e7dd7f
mruby-struct: internal linkage for all functions
2014-06-05 01:16:23 +02:00
take_cheeze
32bfa1f15c
Add invalid key type check in Struct#[]=.
2014-05-28 23:21:13 +09:00
take_cheeze
7bc4d08f71
Support string key in Struct#[]=.
2014-05-28 23:14:28 +09:00
Yukihiro "Matz" Matsumoto
59fa859d59
refactoring mruby-struct
2014-05-03 23:50:04 +09:00
Yukihiro "Matz" Matsumoto
1519e441a0
use proper length for mrb_get_values_at()
...
separate mrb_range_beg_len() into two: the one truncates range into the
sequence size, and the one does not. #values_at uses the latter.
2014-05-03 23:35:24 +09:00
take_cheeze
44dc05f12a
Implement Struct#values_at and Array#values_at .
...
Add API `mrb_get_values_at()` to mruby/range.h .
2014-05-02 23:20:48 +09:00
take_cheeze
90d30f306e
Implement Struct#to_h .
2014-04-30 23:00:33 +09:00
take_cheeze
e2f6a905bc
Implement Struct#to_a and Struct#values .
2014-04-27 23:16:32 +09:00
take_cheeze
b5028421b9
Use mrb_int in mrbgem rest argument getting.
2014-04-25 22:02:10 +09:00
take_cheeze
30c672f890
Remove Struct defined check in test.
2014-04-21 21:35:58 +09:00
take_cheeze
3675832b0e
Implement Struct#size and Struct#length .
2014-04-20 22:02:48 +09:00
take_cheeze
bac70ad81d
Use RARRAY_* macro instead of accessing RArray field.
2014-04-18 23:19:25 +09:00
Yukihiro "Matz" Matsumoto
17f4835141
Restore arena index since large struct may create many Proc objects; a patch from @take-cheeze; ref #2052
2014-04-12 21:45:01 +09:00
Yukihiro "Matz" Matsumoto
9e3fe6c53d
Add test cases to 'large struct' test; a patch from @take-cheeze; ref #2052
2014-04-12 21:42:26 +09:00
cubicdaiya
bf3f45fc70
Use mrb_int instead of int
2014-03-25 22:33:53 +09:00
Marcus Stollsteimer
4f0a163842
use the same error message
2014-03-22 09:51:46 +01: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
40c18fca77
self must be the newly created object in initialization block; close #1858
2014-03-19 01:08:46 +09:00
take_cheeze
c73f8d4def
move summary of mrbgems in default gembox to its spec
2014-03-17 00:34:24 +09:00
Yukihiro "Matz" Matsumoto
c476c1b528
symbol length type to be mrb_int
2014-03-15 15:43:40 +09:00
take_cheeze
7c4961234d
fix mrb_funcall calling
2014-03-12 10:18:38 +09: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
Yukihiro "Matz" Matsumoto
c93f873ac0
Merge pull request #1744 from cubicdaiya/feature/introduce_mrb_str_cat_lit
...
Introduce mrb_str_cat_lit
2014-02-26 21:54:05 +09:00
cubicdaiya
a860735d0c
use mrb_str_cat_lit() more widely
2014-02-26 03:03:47 +09:00
cubicdaiya
94c5a5ee73
use mrb_str_new_lit instead of mrb_str_new for C string literals
2014-02-26 02:23:50 +09:00
cremno
8bbc2c107b
mrb_str_cat2: deprecated since 0cedf8f
2014-02-13 13:45:28 +01:00
Carson McDonald
d3a057caed
Increase test coverage of mruby-struct
2014-01-16 17:54:56 -05: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
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
Yuichi Nishiwaki
0e4a7b2a03
eliminate use of traditional intern API (mrb_intern()) completely
2013-09-23 19:36:50 -07: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
Jun Hiroe
3cf1a9beae
Replace mrb_intern() with mrb_intern2() or mrb_intern_cstr().
2013-07-14 00:39:21 +09:00
Carson McDonald
b39388e152
Fix signed/unsigned warning.
2013-07-01 07:05:47 -04:00
Yukihiro "Matz" Matsumoto
5c0b9b703c
primary mruby fiber implementation
2013-05-20 17:54:07 +09:00