diff options
author | Mari Imaizumi <mariimaizumi5@gmail.com> | 2025-08-31 23:02:23 +0900 |
---|---|---|
committer | Mari Imaizumi <mariimaizumi5@gmail.com> | 2025-09-01 08:17:21 +0900 |
commit | ed0ffcdc80c41b3b1adacc7135ddf7880380c6a3 (patch) | |
tree | 0e0743b94560e4d448b3fd01700f3798b7e67896 | |
parent | 266393d333490fc5ab4055a48947a638673ed655 (diff) |
Remove unnecessary Enumerable#each_slice
This method has been a built-in feature since Ruby 1.8.7, so this
fallback implementation is no longer needed.
Ref: https://docs.ruby-lang.org/en/3.4/NEWS/NEWS-1_8_7.html
-rw-r--r-- | template/unicode_norm_gen.tmpl | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/template/unicode_norm_gen.tmpl b/template/unicode_norm_gen.tmpl index 17505f100e..773a727cec 100644 --- a/template/unicode_norm_gen.tmpl +++ b/template/unicode_norm_gen.tmpl @@ -22,23 +22,6 @@ class Integer end end -module Enumerable - unless method_defined?(:each_slice) - def each_slice(n) - ary = [] - each do |i| - ary << i - if ary.size >= n - yield ary - ary = [] - end - end - yield ary unless ary.empty? - self - end - end -end - class Array def to_UTF8() collect {|c| c.to_UTF8}.join('') end |