Commit Graph

116 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 8b0a4519b1 mruby-enum-ext: fix remaining block parameter spacing
changed block spacing from method{ to method { for consistency.

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-11 18:09:09 +09:00
Yukihiro "Matz" Matsumoto 89237e9cf9 mruby-enum-ext: 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 4dedb120c8 mruby-enum-ext: add parentheses to respond_to? call
added parentheses to respond_to? call where the return value is used.

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-11 18:09:08 +09:00
Yukihiro "Matz" Matsumoto 2e71944f2b mruby-enum-ext: add parentheses to to_enum calls
added parentheses to all to_enum calls where the return value is used.

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-11 18:09:06 +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 f835b86d10 mruby-enum-ext: add README.md
The document is written by Google Jules.
2025-06-07 11:53:04 +09:00
Yukihiro "Matz" Matsumoto 8c2ea232ea Revert "mruby-enum-ext (cycle): need to splat block parameters; #6508"
This reverts commit 6c4b799b42.
2025-04-07 08:23:52 +09:00
Yukihiro "Matz" Matsumoto 6c4b799b42 mruby-enum-ext (cycle): need to splat block parameters; #6508 2025-04-06 22:05:57 +09:00
Yukihiro "Matz" Matsumoto 96855d31b5 mruby-enum-ext (sum): need to honor index; fix #6508 2025-04-06 22:04:56 +09:00
Yukihiro "Matz" Matsumoto dd68681002 mruby-enum-ext: tally should respect multi-values; fix #6507 2025-04-05 22:12:51 +09:00
Yukihiro "Matz" Matsumoto cb8cd9388c mruby-enum-ext: filter_map should not ignore index; fix #6504 2025-04-05 21:44:49 +09:00
Yukihiro "Matz" Matsumoto 9326c514c5 mruby-enum-ext: add Enumerable#each_entry test 2024-07-20 14:20:15 +09:00
Yukihiro "Matz" Matsumoto c539256b43 mruby-enum-ext: add Enumerable#each_entry 2024-07-19 23:29:45 +09:00
Yukihiro "Matz" Matsumoto 1a8df40392 mruby-enum-ext: add Array#sort_by! method 2024-07-15 21:35:42 +09:00
Yukihiro "Matz" Matsumoto f1a04dae3e mruby-enum-ext (sort_by): avoid copying the receiver
When the receiver is an Array.
2024-07-03 07:31:32 +09:00
Yukihiro "Matz" Matsumoto 1f80b875c4 mruby-enum-ext: use NONE.equal?() for NONE comparison; ref #6262 2024-05-10 20:40:11 +09:00
buty4649 97203729a9 Add Enumerable#grep_v to mruby-enum-ext 2024-01-20 11:47:37 +09:00
John Bampton ea8964ef35 ruby: standardize whitespace 2022-10-31 16:25:56 +10:00
Yukihiro "Matz" Matsumoto a4099ff776 enum-ext/enum.rb: add Enumerable#sum 2022-09-19 12:31:11 +09:00
Yukihiro "Matz" Matsumoto 4d249c28d9 Skip tests that use Float inside; ref #5421 2021-04-24 12:04:08 +09:00
John Bampton 9d32d440eb feat(CI): add the GitHub Super Linter
The GitHub Super Linter is a more robust and better supported
tool than the current GitHub Actions we are using.

Running these checks:

ERROR_ON_MISSING_EXEC_BIT: true
VALIDATE_BASH: true
VALIDATE_BASH_EXEC: true
VALIDATE_EDITORCONFIG: true
VALIDATE_MARKDOWN: true
VALIDATE_SHELL_SHFMT: true
VALIDATE_YAML: true

https://github.com/marketplace/actions/super-linter
https://github.com/github/super-linter

Added the GitHub Super Linter badge to the README.

Also updated the pre-commit framework and added
more documentation on pre-commit.

Added one more pre-commit check: check-executables-have-shebangs

Added one extra check for merge conflicts to our
GitHub Actions.

EditorConfig and Markdown linting.

Minor grammar and spelling fixes.

Update linter.yml
2021-04-16 16:37:52 +09:00
KOBAYASHI Shuji c7c344dbc2 Fix Enumerable#filter_map without block; ref d380c7d2 2019-09-18 19:33:15 +09:00
Yukihiro "Matz" Matsumoto a57b6f8ed0 Implement Enumerable tally from Ruby2.7. 2019-09-16 10:10:09 +09:00
Yukihiro "Matz" Matsumoto d380c7d26f Implement filter_map from Ruby2.6. 2019-09-16 10:10:09 +09:00
Yukihiro "Matz" Matsumoto 57a0132b41 Add filter aliases for Enumerable and Hash. 2019-09-16 10:10:09 +09:00
KOBAYASHI Shuji 2d520eaf6f Move NilClass#to_h to mruby-object-ext from mruby-enum-ext 2019-07-24 20:13:26 +09:00
Yukihiro "Matz" Matsumoto 971bfd13c1 Merge pull request #4284 from shuujii/use-assert_same-instead-of-assert_equal-in-enum-reverse_each-test
Use `assert_same` instead of `assert_equal` in `Enumerable#reverse_each` test
2019-02-18 21:50:08 +09:00
KOBAYASHI Shuji d68eb3d043 Fix wrong assertion method in some tests 2019-02-18 21:24:20 +09:00
KOBAYASHI Shuji f86e4a5d93 Use assert_same instead of assert_equal in Enumerable#reverse_each test 2019-02-18 21:06:18 +09:00
KOBAYASHI Shuji 6da3cd5d22 Move NONE to mrblib/enum.rb 2019-02-01 16:02:01 +09:00
Yukihiro "Matz" Matsumoto afca99a40b Remove implicit conversion using to_int method.
The ISO standard does not include implicit type conversion using
`to_int`. This implicit conversion often causes vulnerability.
There will be no more attacks like #4120.

In addition, we have added internal convenience method `__to_int` which
does type check and conversion (from floats).
2018-11-19 11:28:51 +09:00
Tomoyuki Sahara 91444c4747 replace quicksort with mergesort. 2018-10-18 13:07:47 +09:00
Yukihiro "Matz" Matsumoto 19d3bb2d90 Make #to_h to take a block; [ruby-core:89088] 2018-09-20 13:47:29 +09:00
ksss e683c95e90 Refactoring for Enumerable#each_with_object
`each_with_object` arity should be 1
2018-03-27 23:09:10 +09:00
ksss b1c8fad94a Should raise TypeError instead of NoMethodError 2018-03-27 10:52:32 +09:00
ksss 5a7ce01f12 Support block yielding for Enumerable#zip 2018-03-27 10:51:59 +09:00
Yukihiro "Matz" Matsumoto 1a8483f17e __sort_sub__ is a method defined in Array; fix #3970
Reorganize `__sort_sub__` arguments.
2018-03-16 14:49:51 +09:00
Yukihiro "Matz" Matsumoto e4a9b4a3ad `Enumerable#{one?,none?,all?,any?} to take pattern argument [Ruby2.5] 2017-12-25 23:43:43 +09:00
Yukihiro "Matz" Matsumoto db8265f428 Add Comparable#uniq; CRuby2.4 2017-10-17 12:46:51 +09:00
Yukihiro "Matz" Matsumoto 7b8d784040 Reimplement sort method to reduce array copying. 2017-07-25 14:42:38 +09:00
Yukihiro "Matz" Matsumoto 6a992a2579 Merge pull request #3577 from okkez/fix-return-value-of-each-slice
Change return value of Enumerable#each_slice
2017-04-03 18:04:57 +09:00
Kenji Okimoto cff54ab2f3 Change return value of Enumerable#each_slice
More compatibility to CRuby.
2017-04-03 16:46:47 +09:00
Kenji Okimoto 4975aa4c1c Change return value of Enumberable#each_cons
More compatibility to CRuby.
2017-04-03 16:42:53 +09:00
ksss 1bf565ea04 Argument more strictly 2016-11-25 22:25:48 +09:00
ksss c28a963bf4 Like a Enumerable#take 2016-11-25 22:20:33 +09:00
ksss 5134734541 Shouldn't call each method if size is 0 2016-11-24 10:35:15 +09:00
ksss 9e2faec8e4 Support object does'n have < method 2016-11-24 10:34:14 +09:00
ksss 7685783af4 Add regression test for Enumerable#cycle 2016-11-11 16:53:42 +09:00
ksss 126d55480d Reimplement Enumerable#cycle
Fix pattern of infinite loop
And support all specs in https://github.com/ruby/spec/blob/27960d06e0ce92c37f074450f0eab4b0519b118c/core/enumerable/cycle_spec.rb without Enumerable#size
2016-11-11 16:53:42 +09:00
Yukihiro "Matz" Matsumoto 0e03a7f2a3 mruby-enum-ext: refine minmax 2016-03-30 01:12:18 +09:00