You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Daniel Spiewak <dj...@gmail.com> on 2009/07/15 02:12:22 UTC

Re: findbugs uses a reserved word for a child element - trying to invoke "class" method

Try calling method_missing directly:

ant.method_missing :class, :location => 'foo'

Daniel

On Tue, Jul 14, 2009 at 7:09 PM, Martin Grotzke <
martin.grotzke@javakaffee.de> wrote:

> Hi,
>
> findbugs requires a nested element "class" that indicates, which classes
> shall be analyzed.
>
> When I try to specify this class property via
>  ant.class :location=>'foo'
> this of course fails.
>
> Is it somehow possible to solve this issue? (Perhaps ruby as a dynamic
> language can now score :))
>
> (I already tried s.th. like "ant.send :class ..." but without success -
> probably that was just too naive :))
>
> Thx && cheers,
> Martin
>
>
>

Re: findbugs uses a reserved word for a child element - trying to invoke "class" method

Posted by Martin Grotzke <ma...@javakaffee.de>.
Great, that did the trick!

Cheers,
Martin


On Tue, 2009-07-14 at 19:12 -0500, Daniel Spiewak wrote:
> Try calling method_missing directly:
> 
> ant.method_missing :class, :location => 'foo'
> 
> Daniel
> 
> On Tue, Jul 14, 2009 at 7:09 PM, Martin Grotzke <
> martin.grotzke@javakaffee.de> wrote:
> 
> > Hi,
> >
> > findbugs requires a nested element "class" that indicates, which classes
> > shall be analyzed.
> >
> > When I try to specify this class property via
> >  ant.class :location=>'foo'
> > this of course fails.
> >
> > Is it somehow possible to solve this issue? (Perhaps ruby as a dynamic
> > language can now score :))
> >
> > (I already tried s.th. like "ant.send :class ..." but without success -
> > probably that was just too naive :))
> >
> > Thx && cheers,
> > Martin
> >
> >
> >

Re: findbugs uses a reserved word for a child element - trying to invoke "class" method

Posted by Alex Boisvert <bo...@intalio.com>.
Oh, yes, you're right.  I forgot Ruby doesn't do method dispatch based on
number of arguments.

alex

On Tue, Jul 14, 2009 at 5:41 PM, Daniel Spiewak <dj...@gmail.com> wrote:

> ant.send :class is going to trip the class method in Object I believe.  By
> calling method_missing directly, you can avoid that shadowing.
>
> Daniel
>
> On Tue, Jul 14, 2009 at 7:39 PM, Alex Boisvert <bo...@intalio.com>
> wrote:
>
> > Or
> >
> > ant.send :class, :location => 'foo'
> >
> > alex
> >
> > On Tue, Jul 14, 2009 at 5:12 PM, Daniel Spiewak <dj...@gmail.com>
> > wrote:
> >
> > > Try calling method_missing directly:
> > >
> > > ant.method_missing :class, :location => 'foo'
> > >
> > > Daniel
> > >
> > > On Tue, Jul 14, 2009 at 7:09 PM, Martin Grotzke <
> > > martin.grotzke@javakaffee.de> wrote:
> > >
> > > > Hi,
> > > >
> > > > findbugs requires a nested element "class" that indicates, which
> > classes
> > > > shall be analyzed.
> > > >
> > > > When I try to specify this class property via
> > > >  ant.class :location=>'foo'
> > > > this of course fails.
> > > >
> > > > Is it somehow possible to solve this issue? (Perhaps ruby as a
> dynamic
> > > > language can now score :))
> > > >
> > > > (I already tried s.th. like "ant.send :class ..." but without
> success
> > -
> > > > probably that was just too naive :))
> > > >
> > > > Thx && cheers,
> > > > Martin
> > > >
> > > >
> > > >
> > >
> >
>

Re: findbugs uses a reserved word for a child element - trying to invoke "class" method

Posted by Daniel Spiewak <dj...@gmail.com>.
ant.send :class is going to trip the class method in Object I believe.  By
calling method_missing directly, you can avoid that shadowing.

Daniel

On Tue, Jul 14, 2009 at 7:39 PM, Alex Boisvert <bo...@intalio.com> wrote:

> Or
>
> ant.send :class, :location => 'foo'
>
> alex
>
> On Tue, Jul 14, 2009 at 5:12 PM, Daniel Spiewak <dj...@gmail.com>
> wrote:
>
> > Try calling method_missing directly:
> >
> > ant.method_missing :class, :location => 'foo'
> >
> > Daniel
> >
> > On Tue, Jul 14, 2009 at 7:09 PM, Martin Grotzke <
> > martin.grotzke@javakaffee.de> wrote:
> >
> > > Hi,
> > >
> > > findbugs requires a nested element "class" that indicates, which
> classes
> > > shall be analyzed.
> > >
> > > When I try to specify this class property via
> > >  ant.class :location=>'foo'
> > > this of course fails.
> > >
> > > Is it somehow possible to solve this issue? (Perhaps ruby as a dynamic
> > > language can now score :))
> > >
> > > (I already tried s.th. like "ant.send :class ..." but without success
> -
> > > probably that was just too naive :))
> > >
> > > Thx && cheers,
> > > Martin
> > >
> > >
> > >
> >
>

Re: findbugs uses a reserved word for a child element - trying to invoke "class" method

Posted by Alex Boisvert <bo...@intalio.com>.
Or

ant.send :class, :location => 'foo'

alex

On Tue, Jul 14, 2009 at 5:12 PM, Daniel Spiewak <dj...@gmail.com> wrote:

> Try calling method_missing directly:
>
> ant.method_missing :class, :location => 'foo'
>
> Daniel
>
> On Tue, Jul 14, 2009 at 7:09 PM, Martin Grotzke <
> martin.grotzke@javakaffee.de> wrote:
>
> > Hi,
> >
> > findbugs requires a nested element "class" that indicates, which classes
> > shall be analyzed.
> >
> > When I try to specify this class property via
> >  ant.class :location=>'foo'
> > this of course fails.
> >
> > Is it somehow possible to solve this issue? (Perhaps ruby as a dynamic
> > language can now score :))
> >
> > (I already tried s.th. like "ant.send :class ..." but without success -
> > probably that was just too naive :))
> >
> > Thx && cheers,
> > Martin
> >
> >
> >
>