[#75225] [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7) — k@...
Issue #12324 has been reported by Kazuki Yamaguchi.
6 messages
2016/04/27
[#78693] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
k@rhe.jp wrote:
[#78701] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Kazuki Yamaguchi <k@...>
2016/12/17
On Sat, Dec 17, 2016 at 01:31:12AM +0000, Eric Wong wrote:
[#78702] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
Kazuki Yamaguchi <k@rhe.jp> wrote:
[ruby-core:75083] [Ruby trunk Bug#11970] Multiple Assignment Into a Hash with Destructuring causes segfault
From:
usa@...
Date:
2016-04-22 05:01:38 UTC
List:
ruby-core #75083
Issue #11970 has been updated by Usaku NAKAMURA.
Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED, 2.3: DONE to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE, 2.3: DONE
ruby_2_2 r54671 merged revision(s) 53495.
----------------------------------------
Bug #11970: Multiple Assignment Into a Hash with Destructuring causes segfault
https://bugs.ruby-lang.org/issues/11970#change-58205
* Author: Davis Wahl
* Status: Closed
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE, 2.3: DONE
----------------------------------------
Segfaults in 2.2.3 and 2.3.0, In 2.1.0 and below, produces `{[:foo]=>:bar}`
~~~ruby
foo = [:foo]
bar = [:bar]
h = {}
h[*foo], _tail = *bar # Segfault
~~~
Using hash assignment/destructuring in this way may very well be undefined. I am surprised that the hash key `h[*foo]` destructures in later examples, but I'm not really sure what the behavior should be. A number of similar constructs
produce consistent behavior, which leads me to believe the above syntax should work (or at least not segfault).
Below examples produce the same output in ruby 1.9.3, 2.1.0, 2.2.3, and 2.3.0
~~~ruby
h = {}
h[:foo], _tail = *bar
puts h
# => {:foo => :bar}
h = {}
h[foo[0]], _tail = *bar
puts h
# => {:foo => :bar}
h = {}
h[*foo] = :bar
puts h
# => {:foo => :bar}
~~~
Rubies Tested:
~~~
ruby 1.9.3p550 (2014-10-27 revision 48165) [x86_64-linux]
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
~~~
---Files--------------------------------
dump (12.4 KB)
--
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>