< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #16759 has been updated by Eregon (Benoit Daloze).
Assignee set to nobu (Nobuyoshi Nakada)
Could someone take a look at this place?
It seems a pretty serious bug to segfault/abort when using `Binding#local_variable_set`.
cc @nobu @usa
----------------------------------------
Bug #16759: MinGW 2.5 - SEGV bug with Binding#local_variable_set
https://bugs.ruby-lang.org/issues/16759#change-85918
* Author: MSP-Greg (Greg L)
* Status: Open
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* ruby -v: Ruby MinGW 2.5
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
A failure with MinGW 2.5.8 appeared in ruby/spec CI from the below in core/binding/local_variable_set_spec.rb. I believe the specs passed on 2.5.7:
```ruby
it "raises a NameError on global access" do
bind = binding
-> { bind.local_variable_set(:$0, "") }.should raise_error(NameError)
end
it "raises a NameError on special variable access" do
bind = binding
-> { bind.local_variable_set(:$~, "") }.should raise_error(NameError)
-> { bind.local_variable_set(:$_, "") }.should raise_error(NameError)
end
```
Working locally, the below code failed on both 2.5.7 and 2.5.8, but passed on mswin head & MinGW 2.6 thru head:
```ruby
[:$0, :$~, :$_].each do |v|
a = -> (bind) do
bind.local_variable_set(v, '')
end
begin
a[binding]
rescue => e
puts "#{v} #{e.class}"
end
```
I checked other uses, see https://github.com/MSP-Greg/ruby-testing/blob/master/binding-local-variable.rb. I ran the file in Actions CI on both Ubuntu & Windows, see the 'binding issue' step on any job at:
https://github.com/MSP-Greg/ruby-testing/actions/runs/71232731
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>