るりまサーチ

最速Rubyリファレンスマニュアル検索!
26件ヒット [1-26件を表示] (0.076秒)
トップページ > クエリ:IO[x] > クエリ:p[x] > クエリ:each_char[x]

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. dh p=
  5. dh p

ライブラリ

クラス

検索結果

ARGF.class#each_char -> Enumerator (18138.0)

レシーバに含まれる文字を一文字ずつブロックに渡して評価します。

...t2.txt
# $ ruby test.rb test1.txt test2.txt

# test.rb
ARGF.each_char # => #<Enumerator: ARGF:each_char>
ARGF.each_char{|e|p e}

# => "l"
# "i"
# "n"
# "e"
# "1"
# "\n"
# "l"
# "i"
# "n"
# "e"
# "2"
# "\n"

@see IO#each_char...

ARGF.class#each_char { |c| ... } -> self (18138.0)

レシーバに含まれる文字を一文字ずつブロックに渡して評価します。

...t2.txt
# $ ruby test.rb test1.txt test2.txt

# test.rb
ARGF.each_char # => #<Enumerator: ARGF:each_char>
ARGF.each_char{|e|p e}

# => "l"
# "i"
# "n"
# "e"
# "1"
# "\n"
# "l"
# "i"
# "n"
# "e"
# "2"
# "\n"

@see IO#each_char...

NEWS for Ruby 3.0.0 (120.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Pro...
...cepting a single rest argument and no keywords.
16166

//emlist[][ruby]{
p
r = proc{|*a, **kw| [a, kw]}

p
r.call([1])
# 2.7 => [[1], {}]
# 3.0 => [[[1]], {}]

p
r.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now suppo...
...* String#*
* String#capitalize
* String#center
* String#chomp
* String#chop
* String#delete
* String#delete_prefix
* String#delete_suffix
* String#downcase
* String#dump
* String#each_char
* String#each_grapheme_cluster
* String...