Commit Graph

612 Commits

Author SHA1 Message Date
Jun Hiroe 931414305a Add Array#delete_if 2014-04-21 01:40:39 +09:00
Yukihiro "Matz" Matsumoto 8c177032da Merge pull request #2092 from take-cheeze/test_syntax
Suppress test script syntax warning.
2014-04-21 00:43:43 +09:00
take_cheeze 0d2c307ef6 Suppress test script syntax warning. 2014-04-20 22:11:08 +09:00
take_cheeze 3675832b0e Implement Struct#size and Struct#length . 2014-04-20 22:02:48 +09:00
Yukihiro "Matz" Matsumoto a694110193 Merge pull request #2089 from ksss/sym-casecmp
Implement Symbol#casecmp
2014-04-20 21:30:46 +09:00
Yukihiro "Matz" Matsumoto a6d8df6761 Merge pull request #2088 from ksss/string-casecmp
String#casecmp should be call `to_str`
2014-04-20 21:30:16 +09:00
Yukihiro "Matz" Matsumoto bd75406a3e Merge pull request #2087 from ksss/sym-comparable
Symbol class include Comparable module.
2014-04-20 21:29:15 +09:00
ksss bb52324bd9 Implement Symbol#casecmp 2014-04-20 13:43:59 +09:00
ksss 617fa70211 String#casecmp should be call to_str
when non String object sent
And should be raise TypeError
when can not responsed to `to_str`
2014-04-20 13:25:07 +09:00
ksss 900999b290 Symbol class include Comparable module. 2014-04-20 09:48:33 +09:00
Jun Hiroe cd948b0501 Fix typos in tests for mruby-string-utf8 2014-04-20 02:14:42 +09:00
Yukihiro "Matz" Matsumoto e462475752 Merge pull request #2079 from suzukaze/add-test-of-utf8-string.rindex
Add tests for String#rindex of mruby-string-utf8.
2014-04-19 12:02:52 +09:00
Yukihiro "Matz" Matsumoto edb8cca478 Merge pull request #2077 from take-cheeze/rstruct_macro
Use RARRAY_* macro instead of accessing RArray field.
2014-04-19 12:01:18 +09:00
Jun Hiroe 29bbeb1512 Add tests for utf8-string#rindex 2014-04-19 01:12:58 +09:00
Yukihiro "Matz" Matsumoto 751e74a8fb Merge pull request #2078 from suzukaze/add-block-with-array.uniq_bang
Add block argument with Array#uniq! and Array#uniq
2014-04-19 00:01:08 +09:00
Yukihiro "Matz" Matsumoto 73c0ea5ffa mruby-string-utf8: update UTF-8 tests; ref #2076 2014-04-18 23:46:18 +09:00
Yukihiro "Matz" Matsumoto b2422cf021 mruby-string-utf8: str_subseq takes UTF-8 index, not byte index; ref #2076 2014-04-18 23:45:26 +09:00
take_cheeze bac70ad81d Use RARRAY_* macro instead of accessing RArray field. 2014-04-18 23:19:25 +09:00
Jun Hiroe cb5e6edb7f Add a block argument with Array#uniq 2014-04-18 23:13:10 +09:00
Jun Hiroe 80646a7890 Add a block argument with Array#uniq_bang 2014-04-18 23:13:02 +09:00
mattn 280f9dfc19 Add one more test 2014-04-18 21:05:03 +09:00
mattn 1d5e100e07 Add test for String#ord, String#split for mruby-string-utf8 2014-04-18 21:00:59 +09:00
mattn d72b8c201d Implement String#ord, String#split for mruby-string-utf8 2014-04-18 02:26:17 +09:00
Yukihiro "Matz" Matsumoto 7c1b3f8a86 mruby-string-utf8: String#reverse! may leak memory when mrb_str_modify() raises exception 2014-04-18 00:56:50 +09:00
mattn db88af83df Cosmetic change 2014-04-17 19:51:45 +09:00
mattn ba5a995c23 Handle utf-8 code in index/rindex 2014-04-17 19:47:01 +09:00
mattn 9d520ae739 Implement String#index, fixes #2073 2014-04-17 18:22:07 +09:00
take_cheeze 699964a86e Use mrb_regexp_p to check regexp. 2014-04-17 14:32:45 +09:00
Yukihiro "Matz" Matsumoto 1d51d1a0b5 Symbol#to_proc to support block call.
based on a patch from @ksss; close #2071
2014-04-17 13:28:54 +09:00
Yukihiro "Matz" Matsumoto dbe85f81dd raises an ArgumentError when calling #call
based on a patch from @ksss; close #2070
2014-04-17 09:37:40 +09:00
take_cheeze b5824f3649 Use mruby/re.h instead of duplicate definition. 2014-04-16 22:41:22 +09:00
take_cheeze 96f40c9ec4 Add test for UTF-8 string String#size . 2014-04-15 22:39:52 +09:00
Takeshi Watanabe 6e0c48d758 Fix and add test to Proc#inspect . 2014-04-14 22:01:52 +09:00
cremno 649081661a reduce RSTRING_PTR usage 2014-04-14 00:58:34 +02:00
cremno 06a946abb2 mruby-time: fix check of mktime's return value
>If the calendar time cannot be represented, the function returns the
value (time_t)(-1).
http://www.iso-9899.info/n1256.html#7.23.2.3p3
2014-04-13 16:43:13 +02:00
cremno 8b5cbe2f33 mruby-time: remove unnecessary tzset call
The gem doesn't use the global variables and:
>Local timezone information is used as though localtime() calls tzset().
http://pubs.opengroup.org/onlinepubs/9699919799/functions/localtime.html
2014-04-13 16:39:16 +02:00
Yukihiro "Matz" Matsumoto b046ded67d remove mirb regression test that fails on travis-ci only 2014-04-12 23:10:58 +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
Jun Hiroe c471cea4d7 Add Array#uniq_bang test 2014-04-12 15:57:14 +09:00
Jun Hiroe 957a0d0439 Refactor array test to use assert_xxx method 2014-04-12 15:18:07 +09:00
Jun Hiroe 0898f40ccc Add Array#rotate_bang 2014-04-12 01:19:44 +09:00
Yukihiro "Matz" Matsumoto fe55b9dd1c Merge pull request #2045 from suzukaze/add-array.rotate
Array#rotate
2014-04-11 23:45:52 +09:00
Jun Hiroe 7ed47c1223 Array#rotate 2014-04-11 23:42:40 +09:00
Takeshi Watanabe 824d3450c5 Qualify argv argument of API const. 2014-04-11 20:38:23 +09:00
Yukihiro "Matz" Matsumoto 950fe963ac should have passed args to to_enum 2014-04-06 20:31:37 +09:00
Yukihiro "Matz" Matsumoto 8808c9a31a wrap args by parens 2014-04-06 20:29:54 +09:00
Yukihiro "Matz" Matsumoto d016059b07 Merge pull request #2017 from suzukaze/fix_enumerator.inspect
Add args in Enumerator#inspect
2014-04-06 20:27:07 +09:00
take_cheeze c4f14755a7 Always increment total field of os_count_struct in callback.
Check sum of `ObjectSpace.count_objects` values is twice of total objects count.
(Which is CRuby's behavior.)
2014-04-06 18:13:29 +09:00
Jun Hiroe 1368ae647b Add args in Enumerator#inspect 2014-04-06 02:45:04 +09:00