[#51792] [ruby-trunk - Bug #7768][Open] Inherited Array class missing — "england (Roman Ivanilov)" <englandpost@...>

14 messages 2013/02/01

[#51834] [ruby-trunk - Bug #7780][Open] Marshal & YAML should deserialize only basic types by default. — "marcandre (Marc-Andre Lafortune)" <ruby-core@...>

19 messages 2013/02/04

[#51897] [ruby-trunk - Feature #7791][Open] Let symbols be garbage collected — "rosenfeld (Rodrigo Rosenfeld Rosas)" <rr.rosas@...>

64 messages 2013/02/06
[#51899] [ruby-trunk - Feature #7791][Feedback] Let symbols be garbage collected — "shyouhei (Shyouhei Urabe)" <shyouhei@...> 2013/02/06

[#51909] Re: [ruby-trunk - Feature #7791][Feedback] Let symbols be garbage collected — SASADA Koichi <ko1@...> 2013/02/06

(2013/02/06 22:50), shyouhei (Shyouhei Urabe) wrote:

[#51898] [ruby-trunk - Feature #7792][Open] Make symbols and strings the same thing — "rosenfeld (Rodrigo Rosenfeld Rosas)" <rr.rosas@...>

86 messages 2013/02/06
[#51914] [ruby-trunk - Feature #7792] Make symbols and strings the same thing — "rosenfeld (Rodrigo Rosenfeld Rosas)" <rr.rosas@...> 2013/02/06

[#51916] Re: [ruby-trunk - Feature #7792] Make symbols and strings the same thing — Yorick Peterse <yorickpeterse@...> 2013/02/06

You don't need to hijack any code for it, you'd just use it as

[#51933] [ruby-trunk - Feature #7793][Open] New methods on Hash — "dsisnero (Dominic Sisneros)" <dsisnero@...>

20 messages 2013/02/06

[#51965] [ruby-trunk - Feature #7795][Open] Symbol.defined? and/or to_existing_symbol — "Student (Nathan Zook)" <blogger@...>

13 messages 2013/02/07

[#51977] [ruby-trunk - Feature #7797][Open] Hash should be renamed to StrictHash and a new Hash should be created to behave like AS HashWithIndifferentAccess — "rosenfeld (Rodrigo Rosenfeld Rosas)" <rr.rosas@...>

22 messages 2013/02/07

[#52042] [ruby-trunk - Bug #7805][Open] ruby 2.0rc2 core on solaris — "groenveld@... (John Groenveld)" <groenveld@...>

23 messages 2013/02/08

[#52049] [ruby-trunk - Bug #7807][Open] [PATCH] Remove duplicated load paths when empty version string is configured — "vo.x (Vit Ondruch)" <v.ondruch@...>

9 messages 2013/02/08

[#52075] [ruby-trunk - Feature #7816][Open] Don't invalidate method caches when defining a new method on a class without subclasses — "charliesome (Charlie Somerville)" <charlie@...>

17 messages 2013/02/09

[#52077] [ruby-trunk - Bug #7817][Open] (Unable to compile Ruby 2.0.0-rc2 on OSX (clang version 2.1) — "injekt (Lee Jarvis)" <ljjarvis@...>

10 messages 2013/02/09

[#52087] [ruby-trunk - Bug #7820][Assigned] Let's decide Ruby 2.0 supported platform list — "mame (Yusuke Endoh)" <mame@...>

15 messages 2013/02/10

[#52130] [ruby-trunk - Bug #7829][Open] Rounding error in Ruby Time — "loirotte (Philippe Dosch)" <loirotte@...>

25 messages 2013/02/11
[#52579] [ruby-trunk - Bug #7829] Rounding error in Ruby Time — "loirotte (Philippe Dosch)" <loirotte@...> 2013/02/20

[#52586] Re: [ruby-trunk - Bug #7829] Rounding error in Ruby Time — David MacMahon <davidm@...> 2013/02/20

[#52131] [ruby-trunk - Bug #7830][Open] Ruby packages should not build with -Werror when distributed — "kremenek (Ted Kremenek)" <kremenek@...>

21 messages 2013/02/11

[#52134] [ruby-trunk - Bug #7831][Open] Net::HTTP does not allow users to handle Content-Encoding in responses like 1.x — "drbrain (Eric Hodel)" <drbrain@...7.net>

10 messages 2013/02/11

[#52160] [ruby-trunk - Feature #7836][Open] Need a way to get Method and UnboundMethod objects to methods overridden by prepended modules — "banister (john mair)" <jrmair@...>

12 messages 2013/02/12

[#52165] [ruby-trunk - Feature #7839][Open] Symbol.freeze_symbols — "tenderlovemaking (Aaron Patterson)" <aaron@...>

23 messages 2013/02/12

[#52206] [ruby-trunk - Bug #7842][Assigned] An alias of a "prepend"ed method skips the original method when calling super — "mame (Yusuke Endoh)" <mame@...>

15 messages 2013/02/13

[#52215] [ruby-trunk - Bug #7845][Open] Strip doesn't handle unicode space characters in ruby 1.9.2 & 1.9.3 (does in 1.9.1) — "timothyg56 (Timothy Garnett)" <timothyg@...>

18 messages 2013/02/13

[#52267] [ruby-trunk - Feature #7854][Open] New method Symbol[string] — "Student (Nathan Zook)" <blogger@...>

22 messages 2013/02/14

[#52296] [ruby-trunk - Bug #7860][Open] Passing --libdir to ./configure causes Gem.ruby to point to an incorrect ruby interpreter path — "cwgem (Chris White)" <cwprogram@...>

11 messages 2013/02/15

[#52395] [ruby-trunk - Bug #7874][Open] multiarch support enhancements — "terceiro (Antonio Terceiro)" <terceiro@...>

16 messages 2013/02/17

[#52513] [ruby-trunk - Feature #7882][Open] Allow rescue/else/ensure in do..end — "charliesome (Charlie Somerville)" <charlie@...>

11 messages 2013/02/19

[#52514] [ruby-trunk - Feature #7883][Open] Add Regex#to_proc — "rklemme (Robert Klemme)" <shortcutter@...>

15 messages 2013/02/19

[#52537] [ruby-trunk - Bug #7886][Open] Not recognizing unix group permissions for Mac OS X (Mountain Lion) Active Directory (AD) mobile accounts — "afazio (Alfred Fazio)" <alfred.fazio@...>

12 messages 2013/02/19

[#52596] [CommonRuby - Feature #7895][Open] Exception#backtrace_locations to go with Thread#backtrace_locations and Kernel#caller_locations — "headius (Charles Nutter)" <headius@...>

18 messages 2013/02/20

[#52614] [ruby-trunk - Bug #7897][Open] rubygems 2.0 has an incompatibility about installation of extension libraries if gem package does not contain lib directory — "mrkn (Kenta Murata)" <muraken@...>

8 messages 2013/02/21

[#52727] [ruby-trunk - Feature #7918][Open] Create Signal.in_trap?() — "kosaki (Motohiro KOSAKI)" <kosaki.motohiro@...>

10 messages 2013/02/23

[#52742] [ruby-trunk - Bug #7921][Assigned] Cross-compiling ruby_2_0_0 to Windows is failing (rb_w32_pow) — "luislavena (Luis Lavena)" <luislavena@...>

19 messages 2013/02/23

[#52875] [ruby-trunk - Bug #7956][Open] Install fail with RVM — Sega100500 (Сергей Е) <Sergey.V.Ezhov@...>

14 messages 2013/02/25

[#52877] Any documentation about debugging in Ruby 2.0.0 — Rodrigo Rosenfeld Rosas <rr.rosas@...>

Hi, I couldn't find how to debug Ruby 2.0.0 programs, but only a few

14 messages 2013/02/25
[#52880] Re: Any documentation about debugging in Ruby 2.0.0 — Jeremy Kemper <jeremy@...> 2013/02/25

On Monday, February 25, 2013, Rodrigo Rosenfeld Rosas wrote:

[#52883] Re: Any documentation about debugging in Ruby 2.0.0 — Rodrigo Rosenfeld Rosas <rr.rosas@...> 2013/02/25

Em 25-02-2013 10:47, Jeremy Kemper escreveu:

[#52886] Re: Any documentation about debugging in Ruby 2.0.0 — SASADA Koichi <ko1@...> 2013/02/25

(2013/02/26 0:22), Rodrigo Rosenfeld Rosas wrote:

[#52890] [ruby-trunk - Bug #7958][Open] include FileUtils::Verbose gives NoMethodError when installing files with a different mode — "drbrain (Eric Hodel)" <drbrain@...7.net>

12 messages 2013/02/25

[#52893] [ruby-trunk - Bug #7959][Open] configure contains non-portable shell code — "jeremyevans0 (Jeremy Evans)" <merch-redmine@...>

12 messages 2013/02/25

[#52936] [ruby-trunk - Bug #7968][Open] Poor UDPSocket#send performance in ruby 2.0.0 on windows — "cs96and (Alan Davies)" <alan.n.davies@...>

10 messages 2013/02/26

[#52997] [ruby-trunk - Feature #7978][Open] boolean to_i — "alexeymuranov (Alexey Muranov)" <redmine@...>

14 messages 2013/02/27

[#53017] [ruby-trunk - Bug #7982][Open] rb_raise segfaults on %lli format with (0xffffffff + 1) — "erik.s.chang (Erik Chang)" <erik.s.chang@...>

10 messages 2013/02/28

[#53025] [Backport 200 - Backport #7984][Open] Severe speed issues in 2.0.0 compiled with Clang — "jcole1989 (James Coleman)" <jtc331@...>

13 messages 2013/02/28

[ruby-core:51984] [ruby-trunk - Bug #7768] Inherited Array class missing

From: "charliesome (Charlie Somerville)" <charlie@...>
Date: 2013-02-07 14:26:23 UTC
List: ruby-core #51984
Issue #7768 has been updated by charliesome (Charlie Somerville).


=begin
Summary of my discussion with mame in #ruby-core:

  [00:33:08] <mame1> r30148
  [00:34:16] <mame1> some people complains to your r39004
  [00:34:43] <mame1> because it might be an intentional change by matz at r30148
  [00:34:53] <mame1> http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?revision=30148&view=revision
  [00:35:09] <mame1> * array.c (rb_ary_dup): should copy contents only.  no instance
  [00:35:09] <mame1>  variable, no class would be copied.
  [00:36:04] <nurse> The point is that don't change behavior without matz's accept
  [00:36:09] <mame1> however, matz is now saying the opposite opinion against himself
  [00:36:38] <charliesome> sorry for changing behaviour
  [00:36:44] <mame1> he now prefers the old 1.9.3 behavior
  [00:36:59] <charliesome> the bug looked like a regression, but i fixed the wrong place
  [00:37:25] <mame1> oops, 1.9.3 behavior -> 1.9.2 behavior
  [00:38:53] <mame1> indeed rb_ary_dup impacts too extensively a little
  [00:39:10] <mame1> then how do you fix?
  [00:39:36] <charliesome> so this was the bug http://bugs.ruby-lang.org/issues/7768
  [00:40:25] <mame1> fix only Array#uniq ?
  [00:40:35] <charliesome> mame1: that would be the least intrusive way
  [00:41:16] <charliesome> mame1: do you want me to do it?
  [00:42:22] <mame1> could you create a patch for the way?
  [00:42:36] <charliesome> sure, one moment
  [00:43:25] <mame1> just confirm: you didn't intend to change the behavior of other methods than Array#uniq, right?
  [00:43:53] <mame1> then, it looks good to me to choose "the least intrusive way"
  [00:44:26] <charliesome> mame1: i thought that perhaps there were other methods that would behave inconsistently in some cases like #uniq
  [00:44:47] <charliesome> but i will give you a patch that undoes it
  [00:45:19] <mame1> honestly i agree with you to some extent
  [00:45:33] <mame1> but the timing is bad a little
  [00:45:39] <charliesome> yes, i agree
  [00:45:41] <charliesome> sorry once again
  [00:46:07] <charliesome> something to discuss after 2.0 is released maybe?
  [00:46:18] <mame1> no prob, thank you for your cooperation
  [00:46:35] <mame1> no plan :-)
  [00:47:12] <mame1> ah, it may be difficult to change 2.0.0 after 2.0.0-p0 is released
  [00:47:38] <charliesome> for next minor, i mean
  [00:47:41] <mame1> 2.0.1 or 2.1.0 will include the change, which matz will decide
  [00:47:49] <mame1> yes
  [00:48:29] <charliesome> mame1: https://gist.github.com/charliesome/adeff49e900f6b8a75fc
  [00:48:55] <charliesome> the test i added in r39004 still passes
  [00:49:11] <charliesome> so i think this is ok if you're happy to change Array#uniq's behaviour
  [00:51:31] <mame1> charliesome: it is really a regression, isn't it?
  [00:52:04] <charliesome> mame1: i think so - see http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/26987/diff/array.c
  [00:52:19] <charliesome> it looks like an attempt at an optimization
  [00:52:51] <mame1> yeah, i've seen the diff, but i've not checked the other region of code
  [00:53:15] <charliesome> mame1: maybe the safest option is to revert r39004 completely?
  [00:53:38] <mame1> it returns a new object whose class is the same of the argument, say, when its length is >= 2?
  [00:53:45] <charliesome> mame1: yes
  [00:54:22] <mame1> hmm, thanks. let me consider for a minute :-)
  [00:54:28] <charliesome> no problem
  [01:15:14] <mame1> charliesome: sorry for let you wait
  [01:15:25] <mame1> i decided that i'll release rc2 with the *current* behavior
  [01:15:45] <charliesome> mame1: current as in trunk or current 1.9.3?
  [01:16:00] <mame1> because matz again prefered not only Array#uniq but also other Array methods to return the original class rather than Array
  [01:16:04] <mame1> current trunk
  [01:16:35] <mame1> iow your r39004 is accepted :-)
=end
----------------------------------------
Bug #7768: Inherited Array class missing
https://bugs.ruby-lang.org/issues/7768#change-35987

Author: england (Roman Ivanilov)
Status: Closed
Priority: Normal
Assignee: charliesome (Charlie Somerville)
Category: 
Target version: 2.0.0
ruby -v: 1.9


=begin
Hello. I apologize if I missed something.
I found strange behavior in ruby 1.9:

 class Custom < Array; end
 Custom.new(0){|i| i + 1}.uniq.class # => Array
 Custom.new(2){|i| i + 1}.uniq.class # => Custom

while in 1.8 it works just as I expected. 

 class Custom < Array; end
 Custom.new(0){|i| i + 1}.uniq.class # => Custom
 Custom.new(2){|i| i + 1}.uniq.class # => Custom

* it is actual not only for the uniq method.
* tested with ree-1.8.7-2010.02, ruby-1.9.2-p290, ruby-1.9.3-p375, ruby-1.9.3-p125

Any bug here?

=end


-- 
http://bugs.ruby-lang.org/

In This Thread