[Puppet-dev] Re: [PATCH/puppet 1/1] (#7291) Monkeypatch Symbol class with #sub method in ruby 1.9

2011-05-13 Thread ajsharp
I've included both patches below, with the intention of someone merging in one of the them. The first patch is the Symbol monkeypatch, and the second patch fixes this without a monkey patch to the Symbol class. PATCH 1 === Ruby 1.9 removed Symbol#sub, and it's used in various places in the pu

Re: [Puppet-dev] Re: [PATCH/puppet 1/1] (#7291) Monkeypatch Symbol class with #sub method in ruby 1.9

2011-05-12 Thread Daniel Pittman
You got me. I just use 'git send-email' and stuff, because it lets me do the right thing. :) Daniel On Wed, May 11, 2011 at 17:02, ajsharp wrote: > How do I attach a new/revised patch to this email thread with the > mail_patches rake task? > > On May 10, 11:50 am, markus wrote: >> > > Yea, you

[Puppet-dev] Re: [PATCH/puppet 1/1] (#7291) Monkeypatch Symbol class with #sub method in ruby 1.9

2011-05-11 Thread ajsharp
How do I attach a new/revised patch to this email thread with the mail_patches rake task? On May 10, 11:50 am, markus wrote: > > > Yea, you're probably right. FWIW, here's the offending block of code > > > in lib/puppet/interface/option_builder.rb:19: > > > [...] > > >  Puppet::Interface::Option.

Re: [Puppet-dev] Re: [PATCH/puppet 1/1] (#7291) Monkeypatch Symbol class with #sub method in ruby 1.9

2011-05-10 Thread markus
> > Yea, you're probably right. FWIW, here's the offending block of code > > in lib/puppet/interface/option_builder.rb:19: > > [...] > > Puppet::Interface::Option.instance_methods.grep(/=$/).each do | > > setter| > >next if setter =~ /^=/ > >dsl = setter.to_s.sub(/=$/, '') > > Yeah, tha

Re: [Puppet-dev] Re: [PATCH/puppet 1/1] (#7291) Monkeypatch Symbol class with #sub method in ruby 1.9

2011-05-10 Thread Daniel Pittman
On Tue, May 10, 2011 at 10:49, ajsharp wrote: > Yea, you're probably right. FWIW, here's the offending block of code > in lib/puppet/interface/option_builder.rb:19: [...] >  Puppet::Interface::Option.instance_methods.grep(/=$/).each do | > setter| >    next if setter =~ /^=/ >    dsl = setter.to

[Puppet-dev] Re: [PATCH/puppet 1/1] (#7291) Monkeypatch Symbol class with #sub method in ruby 1.9

2011-05-10 Thread ajsharp
Yea, you're probably right. FWIW, here's the offending block of code in lib/puppet/interface/option_builder.rb:19: Puppet::Interface::Option.instance_methods.grep(/=$/).each do | setter| next if setter =~ /^=/ dsl = setter.sub(/=$/, '') unless private_instance_methods.include? dsl

Re: [Puppet-dev] Re: [PATCH/puppet 1/1] (#7291) Monkeypatch Symbol class with #sub method in ruby 1.9

2011-05-10 Thread Daniel Pittman
I am torn: I like the idea of getting my embarrassing bug out of the way, but I would rather get the right solution in place (or, at least, know what it is) before we go ahead and write or commit them. Daniel On Tue, May 10, 2011 at 10:19, ajsharp wrote: > Cool. If I stick with the monkey patch

[Puppet-dev] Re: [PATCH/puppet 1/1] (#7291) Monkeypatch Symbol class with #sub method in ruby 1.9

2011-05-10 Thread ajsharp
Cool. If I stick with the monkey patch approach, I'll stick it in monkey_patches.rb. I agree, a monkey patch here is definitely not the most desirable solution, but maybe it's an acceptable approach at least to get the specs running. After the specs run under 1.9, I'd be in favor of finding a more