< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #11096 has been updated by Tomoyuki Chikanaga.
Backport changed from 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE
Backorted into ruby_2_2 branch at r50562.
----------------------------------------
Bug #11096: 'private' access control bypassed when ||= is used
https://bugs.ruby-lang.org/issues/11096#change-52506
* Author: Piotr Sokoowski
* Status: Closed
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.3.0dev (2015-04-24 trunk 50382) [x86_64-linux]
* Backport: 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE
----------------------------------------
Problematic code
~~~ruby
class A
def aa
self.bb ||= 0
end
private
def bb
1
end
end
A.new.aa
~~~
On 2.0 and 2.1 this produces 'NoMethodError: private method `bb' called for'. But since 2.2 this works and return '1'. Checked also on ruby-head from rvm.
This is similar #9907 but this allows to execute private methods by pretending that setter might be used.
--
https://bugs.ruby-lang.org/