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
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
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.
> > 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
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
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
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
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