38件ヒット
[1-38件を表示]
(0.042秒)
別のキーワード
種類
- インスタンスメソッド (21)
- 関数 (12)
- 文書 (5)
ライブラリ
- ビルトイン (21)
クラス
- String (21)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (5) -
arg
_ prepend (12)
検索結果
先頭4件
-
String
# prepend(*arguments) -> String (21215.0) -
複数の文字列を先頭に破壊的に追加します。
...複数の文字列を先頭に破壊的に追加します。
@param arguments 追加したい文字列を指定します。
//emlist[例][ruby]{
a = "!!!"
a.prepend # => "!!!"
a # => "!!!"
a = "!!!"
a.prepend "hello ", "world" # => "hello world!!!"
a # => "hello... -
String
# prepend(other _ str) -> String (21210.0) -
文字列 other_str を先頭に破壊的に追加します。
...文字列 other_str を先頭に破壊的に追加します。
@param other_str 追加したい文字列を指定します。
//emlist[例][ruby]{
a = "world"
a.prepend("hello ") # => "hello world"
a # => "hello world"
//}... -
static NODE * arg
_ prepend(NODE *node1 , NODE *node2) (12200.0) -
-
NEWS for Ruby 3
. 0 . 0 (12.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...* Keyword arguments are now 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......accepting a single rest argument and no keywords.
16166
//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}
pr.call([1])
# 2.7 => [[1], {}]
# 3.0 => [[[1]], {}]
pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now......locking execution context. 16786
* Module
* Module#include and Module#prepend now affect classes and modules that have already included or prepended the receiver, mirroring the behavior if the arguments were included in the receiver before the other modules and classes included or prepended th...