< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #9448 has been updated by Nobuyoshi Nakada.
Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN to 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: DONTNEED
----------------------------------------
Bug #9448: Assignment with overridden []= returns return value of method rather than new value
https://bugs.ruby-lang.org/issues/9448#change-44592
* Author: Simon Eskildsen
* Status: Closed
* Priority: Normal
* Assignee:
* Category:
* Target version: current: 2.2.0
* ruby -v: ruby 2.2.0dev
* Backport: 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: DONTNEED
----------------------------------------
When calling []= the assignment will return the return value of the []= method, rather than the value of the right-hand side, which is the behaviour in 2.1.0-p0, 2.0.0-p353 and 1.9.3-p484.
Example code:
class Animal
def []=(key, new_value)
"walrus"
end
end
animal = Animal.new
puts animal['current'] = "unicorn"
In trunk, this returns 'walrus'. In other releases (tested in the ones mentioned above), this returns 'unicorn'.
--
http://bugs.ruby-lang.org/