キーワード
検索結果
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (49.0) -
1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))
...(<ruby-talk:72732>))
ENV['environ'] = 'value'
ENV['environ'].sub!(/value/, 'VALUE')
p ENV['environ']
=> ruby 1.6.8 (2002-12-24) [i586-linux]
"value"
この例のように sub! のような破壊的メソッドの効果がないため混乱すると......いうのが理由です(ENVが返す文字列を変更しても環境変数自体に影響がない)。
=> -:2:in `sub!': can't modify frozen string (TypeError)
from -:2
ruby 1.8.0 (2003-06-09) [i586-linux]
=== Hash
: ((<Hash#update|Hash/update>)) [compat]......String#scan|String/scan>)) [change]
: ((<String#split|String/split>)) [change]
: ((<String#sub|String/sub>)), ((<String#sub!|String/sub!>)) [change]
: ((<String#gsub|String/gsub>)), ((<String#gsub!|String/gsub!>)) [change]
: ((<String#~|String/~>)) [obsolete]
: ((<String#=~|String/=~>)) [obsolete]
:... -
NEWS for Ruby 3
. 0 . 0 (19.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...n 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 Procs
accepting a single rest argument and no keywords.
16166
//emlist[][ruby]{......8661
== Core classes updates
Outstanding ones only.
* Array
* The following methods now return Array instances instead of subclass instances when called on subclass instances: 6087
* Array#drop
* Array#drop_while
* Array#flatten
* Array#slice!
* Array#slice /......m` instance with `Random.new` instead. 17351
* String
* The following methods now return or yield String instances instead of subclass instances when called on subclass instances: 10845
* String#*
* String#capitalize
* String#center
* String#chomp
* String#chop...