Gentle core folk: I'm updating the PickAxe for Ruby 2, and I'd like your wisdom. I know that the current RC has file-level refinements in it. However, I also know that things are likely to change. So, my question is: should I document what is there now, or would it be better to wait? I'm a little nervous that if I document the current way it works, it might make it a little harder to change later without breaking backwards compatibility. What do you all think? Dave
on 2013-02-19 05:01
on 2013-02-19 06:52
On Feb 18, 2013, at 19:58, Dave Thomas <dave@pragprog.com> wrote: > What do you all think? I created this document: https://github.com/ruby/ruby/blob/trunk/doc/syntax... From the spec: http://bugs.ruby-lang.org/projects/ruby-trunk/wiki... I think a document in a PickAxe update with appropriate warnings would help us get feedback on refinements.
on 2013-02-19 09:25
> I think a document in a PickAxe update with appropriate warnings would > help us get feedback on refinements. > OK, cool. I'll do it. So, a question: module VanityPuts refine Object do private def puts(*args) args.each do |arg| super("Dave says: #{arg}") end end end end using VanityPuts puts "Hello", "world" This recurses endlessly. However, changing 'super' to 'Kernel::puts' works as expected. Looking at the spec, I would have thought that super would find the Kernel version of the method directly. Am I missing something? Dave
on 2013-02-21 03:31
2013/2/19 Dave Thomas <dave@pragprog.com>: > end > end > > using VanityPuts > > puts "Hello", "world" > > > This recurses endlessly. However, changing 'super' to 'Kernel::puts' works > as expected. It must be a bug. Could you file a ticket at bugs.ruby-lang.org?
on 2013-02-23 23:18
On Wed, Feb 20, 2013 at 9:31 PM, Shugo Maeda <shugo@ruby-lang.org> wrote: > It must be a bug. Could you file a ticket at bugs.ruby-lang.org? > Agreed. I filed http://bugs.ruby-lang.org/issues/7925
on 2013-02-25 03:07
2013/2/24 Marc-Andre Lafortune <ruby-core-mailing-list@marc-andre.ca>: >> It must be a bug. Could you file a ticket at bugs.ruby-lang.org? > > > Agreed. > > I filed http://bugs.ruby-lang.org/issues/7925 Thank you!
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.