[#85349] [Ruby trunk Bug#14334] Segmentation fault after running rspec (ruby/2.5.0/erb.rb:885 / simplecov/source_file.rb:85) — pragtob@...
Issue #14334 has been updated by PragTob (Tobias Pfeiffer).
3 messages
2018/02/02
[#85358] Re: [ruby-cvs:69220] nobu:r62039 (trunk): compile.c: unnecessary freezing — Eric Wong <normalperson@...>
nobu@ruby-lang.org wrote:
5 messages
2018/02/03
[#85612] Why require autoconf 2.67+ — leam hall <leamhall@...>
Please pardon the intrusion; I am new to Ruby and like to pull the
6 messages
2018/02/17
[#85616] Re: Why require autoconf 2.67+
— Vít Ondruch <v.ondruch@...>
2018/02/18
VGhpcyBjb3VsZCBoZWxwIHlvdSB0byBidWlsZCBSdWJ5IHdpdGggb2xkZXIgYXV0b2NvbmYgKDIu
[#85634] [Ruby trunk Bug#14494] [PATCH] tool/m4/ruby_replace_type.m4 use AC_CHECK_TYPES for HAVE_* macros — normalperson@...
Issue #14494 has been reported by normalperson (Eric Wong).
3 messages
2018/02/19
[#85674] [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — matz@...
Issue #13618 has been updated by matz (Yukihiro Matsumoto).
5 messages
2018/02/20
[#85686] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wong <normalperson@...>
2018/02/20
matz@ruby-lang.org wrote:
[#85704] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Koichi Sasada <ko1@...>
2018/02/21
On 2018/02/20 18:06, Eric Wong wrote:
[ruby-core:85385] Re: [Ruby trunk Bug#14380] Expected transform_keys! to work just as transform_keys, but it doesn't
From:
Rafael Mendonça França <rafaelmfranca@...>
Date:
2018-02-05 04:47:58 UTC
List:
ruby-core #85385
Except that it silently breaks applications when upgrading to 2.6 version.
Backward compatibility not only with active support but with an already
released version of Ruby should be took in consideration here.
On Sat, Feb 3, 2018 at 5:42 PM <Tomasz.Wegrzanowski@gmail.com> wrote:
> Issue #14380 has been updated by taw (Tomasz Wegrzanowski).
>
>
> marcandre (Marc-Andre Lafortune) wrote:
> > I raised this issue previously
> https://bugs.ruby-lang.org/issues/13583#note-8
> >
> > This is a spec change. Moreover it introduces incompatibilities with
> ActiveSupport.
>
> I'd say that ActiveSupport is testing group for possible new ruby features,
> and when getting them into ruby core library, it's good time to clean up
> their edge cases.
>
>
> ----------------------------------------
> Bug #14380: Expected transform_keys! to work just as transform_keys, but
> it doesn't
> https://bugs.ruby-lang.org/issues/14380#change-70146
>
> * Author: taw (Tomasz Wegrzanowski)
> * Status: Open
> * Priority: Normal
> * Assignee: matz (Yukihiro Matsumoto)
> * Target version:
> * ruby -v: ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin17]
> * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
> ----------------------------------------
> This seriously violates the Principle of Least Surprise to me:
>
> {1 => :a, -1 => :b}.transform_keys{|k| -k} #=> {-1=>:a, 1=>:b}
> {1 => :a, -1 => :b}.transform_keys!{|k| -k} # => {1=>:a}
>
> # This fails:
> ht=(1..10).map{|k| [k,k]}.to_h; ht.transform_keys(&:succ) # => {2=>1,
> 3=>2, 4=>3, 5=>4, 6=>5, 7=>6, 8=>7, 9=>8, 10=>9, 11=>10}
> ht=(1..10).map{|k| [k,k]}.to_h; ht.transform_keys!(&:succ) # => {11=>1}
>
> # This code with same issue works just because of key ordering:
> ht=(1..10).map{|k| [k,k]}.to_h; ht.transform_keys(&:pred) #=> {0=>1,
> 1=>2, 2=>3, 3=>4, 4=>5, 5=>6, 6=>7, 7=>8, 8=>9, 9=>10}
> ht=(1..10).map{|k| [k,k]}.to_h; ht.transform_keys!(&:pred) #=> {0=>1,
> 1=>2, 2=>3, 3=>4, 4=>5, 5=>6, 6=>7, 7=>8, 8=>9, 9=>10}
>
> Of course in these examples it's very easy to see the problem, but in
> bigger programs it could be really difficult.
>
> If the implementation instead did equivalent of:
>
> class Hash
> def transform_values!(&block)
> replace transform_values(&block)
> end
> end
>
> it would be much less surprising.
>
> `Hash#transform_keys` / `Hash#transform_keys!` inherently require that
> resulting values don't collide, but in these examples it works in
> surprising ways even though there's no collision between results.
>
>
>
> --
> 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>
>
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>