Yukihiro "Matz" Matsumoto
bc24a32f2d
enum.rb: standardize block parameter spacing
...
changed block spacing from method{ to method { for consistency.
Co-authored-by: Claude <noreply@anthropic.com >
2025-12-11 18:09:08 +09:00
Yukihiro "Matz" Matsumoto
ec1f9860b1
mrblib: add parentheses to method calls with used return values
...
added parentheses to all `to_enum` and `super` calls where the return
value is used (returned, assigned, or passed to another method). this
makes the code style consistent with the guideline that method calls
should use parentheses when their return values are consumed.
changes:
- return to_enum :symbol -> return to_enum(:symbol)
- return to_enum :symbol, arg -> return to_enum(:symbol, arg)
- super message, name -> super(message, name)
affected files: 10error.rb, array.rb, enum.rb, hash.rb, kernel.rb,
numeric.rb, range.rb
Co-authored-by: Claude <noreply@anthropic.com >
2025-12-11 18:09:06 +09:00
Yukihiro "Matz" Matsumoto
fa8f66ed1b
enum.rb: fix Array#hash infinite loop with self-referencing enumerables
...
Modify `Enumerable#hash` to use `__method_recursive?(:hash)` for recursion
detection, preventing infinite loops when hashing self-referencing enumerables.
Add a test case to verify the fix.
Co-authored-by: Gemini <gemini@google.com >
2025-08-14 10:53:04 +09:00
Yukihiro "Matz" Matsumoto
07b803e28a
docs: replace xml-style markup with markdown in comments
...
Replace XML-style markup tags in comments with markdown equivalents:
- <code>...</code> to `...` (inline code)
- <tt>...</tt> to `...` (teletype/monospace)
- <i>...</i> to *...* (italics/emphasis)
- +...+ to `...` (parameter/variable references)
Updated 80+ files across core source, headers, mrbgems, and libraries
to use consistent markdown formatting in documentation comments.
Handled edge cases including special characters like <=> operators.
Co-authored-by: Atlassian Rovo Dev
2025-08-14 10:52:49 +09:00
Yukihiro "Matz" Matsumoto
600e3330b3
Scan source files only from cdump enabled gems.
2020-11-14 18:52:57 +09:00
KOBAYASHI Shuji
9f18aced9f
Enumerable#reject, etc. should return Enumerable without block
2019-08-10 22:18:54 +09:00
Yukihiro "Matz" Matsumoto
b4cdced22f
Enumerable#detect {and #find} should call ifnone; fix #4484
...
It's an error in ISO specification; 15.3.2.2.4 and 15.3.2.2.7
2019-07-13 18:05:01 +09:00
KOBAYASHI Shuji
6da3cd5d22
Move NONE to mrblib/enum.rb
2019-02-01 16:02:01 +09:00
Yukihiro "Matz" Matsumoto
50a9c5d7c7
Update the patch to not use funcall in C; ref #4013
2018-04-28 11:26:23 +09:00
kimu_shu
4b29abc565
Fix Enumerable#hash on non 32-bit integer conf.
2018-04-28 11:26:23 +09:00
Yukihiro "Matz" Matsumoto
ceeb8c05df
Needed to pass sort block.
2018-03-16 08:20:43 +09:00
Yukihiro "Matz" Matsumoto
7b8d784040
Reimplement sort method to reduce array copying.
2017-07-25 14:42:38 +09:00
Yusuke Endoh
a1a157b27e
suppress "can't convert Float into Integer" in Enumerable#hash
2016-02-16 00:07:50 +09:00
Seba Gamboa
13b552538a
Remove obvious warnings from docs
2015-10-20 12:48:31 -03:00
go.kikuta
85f0dd7da0
enum.rb: refactor code (remove redundant code)
2015-08-21 14:56:49 +09:00
Yukihiro "Matz" Matsumoto
95412aeb50
better hash value from enumerables; fix #2906
2015-08-03 13:24:04 +09:00
Yukihiro "Matz" Matsumoto
ef3bbd2e64
avoid block_given? in enum.rb to reduce method calls
2014-12-25 15:59:22 +09:00
ksss
d6b4cdb6ac
use Kernel#__send__ insteard of Kernel#send
2014-04-30 22:25:21 +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
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
Yukihiro "Matz" Matsumoto
113ab60784
mruby-enumerator: move definitions in core_mod.rb to mrblib core
2014-03-14 02:41:22 +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
Masaki Muranaka
6cd7017ec1
Remove trailing whitespaces. This is just a cosmetic change.
2013-03-03 10:54:00 +09:00
Yukihiro Matsumoto
3efbea3fab
wrong check of argument numbers
2012-10-19 21:44:58 +09:00
Yukihiro Matsumoto
17278e8ca6
add symbol style to Enumerable#inject
2012-10-19 21:16:18 +09:00
Yukihiro Matsumoto
fd949663d2
Enumerable#inject should handle empty enumerable; http://www.tbn.co.jp/blog/?p=813
2012-10-19 21:09:34 +09:00
Yukihiro Matsumoto
bd8d910666
clean enum.c
2012-05-09 22:09:27 +09:00
Daniel Bovensiepen
ac21975494
Add documentation to Enumerable
2012-05-03 17:46:23 +08:00
mimaki
e0d6430f63
add mruby sources
2012-04-20 09:39:03 +09:00