NEWS for Ruby 1.9.1

此文件列出版本間可見的使用者功能變更,但修正錯誤除外。

請注意,每個條目都簡短到沒有提供背後原因或參考資訊。如需包含所有足夠資訊的完整變更清單,請參閱 ChangeLog 檔案。

自 1.8.7 版本發布以來的變更

請參閱 doc/NEWS-1.8.7 以了解 1.8.6 和 1.8.7 之間的變更。

相容性問題

語言核心變更

* New syntax and semantics
      o Magic comments to declare in which encoding your source
        code is written
      o New literal hash syntax and new syntax for hash style
        arguments
      o New syntax for lambdas
      o .() and calling Procs without #call/#[]
      o Block in block arguments
      o Block local variables
      o Mandatory arguments after optional arguments allowed
      o Multiple splats allowed
      o #[] can take splatted arguments, hash style arguments
        and a block.
      o New directives in printf-style formatted strings (%).
      o Newlines allowed before ternary colon operator (:) and
        method call dot operator (.)
      o Negative operators such as !, != and !~ are now
        overloadable
      o Encoding.default_external and default_internal
      o __ENCODING__: New pseudo variable to hold the current
        script's encoding

函式庫更新

實作變更