ksss
d09e4475bf
Hash#{select,select!} fix yield value
2014-03-23 13:31:26 +09:00
ksss
5e4626c9ba
Hash#{select,select!} support return Enumerator
...
if non block given
2014-03-23 13:31:26 +09:00
ksss
5386cd9b9b
Hash#each_{key,value} support return Enumerator
...
if non block given
2014-03-23 00:22:22 +09:00
Yukihiro "Matz" Matsumoto
041b5a9f67
reduce object allocation in __update
2014-03-21 21:53:50 +09:00
ksss
72fe192259
Fix behavior of Comparable methods
...
when <=> return nil
2014-03-21 11:58:47 +09:00
Yukihiro "Matz" Matsumoto
2c44f96e78
reduce hash creation by using update method
2014-03-21 09:31:44 +09:00
Yukihiro "Matz" Matsumoto
07d81a113d
enum methods to support multiple values; all?, any?, grep, include?, drop, drop_while, take, take_while, each_cons, each_slice, group_by, first, count
2014-03-19 15:36:55 +09:00
Yukihiro "Matz" Matsumoto
2bf718faf8
Merge pull request #1882 from ksss/enum-find_all
...
Enumerable#find_all return Enumerator if non block given
2014-03-19 10:43:54 +09:00
Yukihiro "Matz" Matsumoto
31b2980acb
Merge pull request #1880 from ksss/enum-each_with_index
...
Enumrable#each_with_index return Enumerator if non block given
2014-03-18 22:22:23 +09:00
Tomoyuki Sahara
4b4784f96f
rescue StopIteration only.
2014-03-18 19:02:38 +09:00
ksss
fd80d4ecdd
Enumerable#find_all return Enumerator if non block given
2014-03-17 23:32:31 +09:00
ksss
9abe413530
Enumrable#each_with_index return Enumerator if non block given
2014-03-17 22:31:40 +09:00
Yukihiro "Matz" Matsumoto
26930ddc19
Merge branch 'refactor-enumerable.rb' of https://github.com/suzukaze/mruby into suzukaze-refactor-enumerable.rb
2014-03-17 08:45:05 +09:00
Jun Hiroe
bdeef827ac
Refactor Enumerable#include?
2014-03-17 01:18:45 +09:00
Jun Hiroe
a21088b2d7
Refactor Enumerable#any?
2014-03-17 01:18:44 +09:00
Jun Hiroe
b9632bce46
Refactor Enumerable#all?
2014-03-17 01:18:44 +09:00
Yukihiro "Matz" Matsumoto
5ac737cf88
add Enumerable#sort_by
2014-03-17 01:09:07 +09:00
Yukihiro "Matz" Matsumoto
027d6407cc
make Enumerable methods to support multiple values; collect, detect, each_with_index, find_all, inject, max, min, partition, reject, sort
2014-03-17 00:53:08 +09:00
Yukihiro "Matz" Matsumoto
ed2fe64076
Enumerable#entries to support multiple values; close #1868
2014-03-17 00:34:47 +09:00
ksss
bc63518fa7
modify core method that return Enumerator object if not block given
2014-03-15 08:15:04 +09:00
Yukihiro "Matz" Matsumoto
113ab60784
mruby-enumerator: move definitions in core_mod.rb to mrblib core
2014-03-14 02:41:22 +09:00
Tomoyuki Sahara
9686890ab3
Fix Float#divmod.
2014-03-04 10:51:36 +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
3ff9aad22f
move version info from gems to core; ref #576 #1684
2014-02-07 12:18:55 +09:00
Yukihiro "Matz" Matsumoto
5172f4797f
add RUBY_VERSION to notify syntax compatible version
2014-02-05 13:27:30 +09:00
Yukihiro "Matz" Matsumoto
c7cff199dc
hash value of enumerable should be obtained from its elements; close #1658
2014-01-16 21:33:48 +09:00
Yukihiro "Matz" Matsumoto
ff9b41cc37
Merge pull request #1654 from iij/pr-not-match-operator
...
add operator "!~".
2014-01-09 22:04:01 -08:00
Tomoyuki Sahara
83413218a5
add operator "!~".
2014-01-10 13:41:41 +09:00
Tomoyuki Sahara
3b76aae4f0
fix ISO reference number of String#=~.
2014-01-10 12:01:24 +09: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
Yukihiro "Matz" Matsumoto
4d92d2e1aa
string type check based on #to_str to encourage duck typing; #1616
2013-12-24 07:02:37 +09:00
h2so5
e137d1423d
verify the argument of String#=~
2013-12-24 00:09:34 +09:00
Yukihiro "Matz" Matsumoto
9eadd05f32
modify upto/downto for compatibility
2013-10-23 10:34:00 +09:00
Yukihiro "Matz" Matsumoto
2607970ed9
move some methods to make floats and integers compatible [mruby special]
2013-10-22 16:18:11 +09:00
Yukihiro "Matz" Matsumoto
620f8b2721
implement some Numeric methods in Ruby
2013-10-22 15:59:41 +09:00
Yukihiro "Matz" Matsumoto
3ae0616710
implement Integer#succ in Ruby
2013-10-21 07:42:50 +09:00
Yukihiro "Matz" Matsumoto
954c28504e
remove Ruby defined Class#new
2013-08-15 01:37:29 +09:00
Yukihiro "Matz" Matsumoto
babc8d0086
implement Class.new in C again
2013-08-15 00:35:41 +09:00
Carson McDonald
dbd243487f
Fix inerited to inherited
2013-08-13 22:11:40 -04:00
Yukihiro "Matz" Matsumoto
6b015ec775
define Class#new in ruby to call #initialize
2013-08-13 16:55:06 +09:00
Yukihiro "Matz" Matsumoto
8d7e716158
String =~ and match to work with pluggable Regexp; close #1398
2013-07-23 20:22:15 +09:00
Ryan Scott
43c0f43f13
Changed the attr methods in mrblib, so that they take advantage of validating the name against a string parameter if need be
2013-07-21 18:13:19 +10:00
Ryan Scott
fe5324bd17
Wrote tests around attr, attr_reader, attr_writer, attr_accessor
2013-07-19 22:39:54 +10:00
Masaki Muranaka
82c891acee
Move comments from hash.c to hash.rb.
2013-05-08 13:22:35 +09:00
h2so5
5a8e76cc7b
Add NotImplementedError for Kernel. and Kernel#
2013-04-09 14:04:58 +09:00
Yukihiro "Matz" Matsumoto
5de9a8cc50
sort mrblib/*.rb files to compile (class.rb comes before error.rb); close #1132 ; close #1134
2013-04-05 13:19:58 +09:00
Masaki Muranaka
edd0a62106
Add NameError#name. Fix NameError.new and NameError.initialize. Enable 2nd argument for NameError.new in C API.
2013-04-04 16:24:43 +09:00
Masaki Muranaka
cbe7a87c68
Move Integer.{floor,ceil,round,truncate} to mrblib/. For maintainability.
2013-03-31 23:04:45 +09:00
Yukihiro Matz Matsumoto
a0f6e4d58e
resolve conflict from #964
2013-03-27 00:52:24 +09:00
mattn
e53fa35748
Remove __printstr__
2013-03-24 00:18:39 +09:00