logo       

Re: java.lang.reflect.Array considered harmful?: msg#00033

lang.jruby.user

Subject: Re: java.lang.reflect.Array considered harmful?

On Tue, 14 Feb 2006, Werner Schuster (murphee) defenestrated me:
> Damian Steer wrote:
>
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >Werner Schuster (murphee) wrote:
> >
> >
> >
> >>include_class "java.lang.reflect.Array" { |p,name| "J" + name }
> >>I get: "syntax error".
> >>
> >>
> >Hmm, I think I've seen that before. Try do ... end rather than { ... }?
> >
> >
> Thanks! This works:
>
> include_class "java.lang.reflect.Array" do |p,n|
> "J" + n
> end

include_class('java.lang.reflect.Array') {...}

will work too. Ruby parser cannot deal with lack or parens and {}...

-Tom

--
+ http://www.tc.umn.edu/~enebo +---- mailto:enebo@xxxxxxx ----+
| Thomas E Enebo, Protagonist | "Luck favors the prepared |
| | mind." -Louis Pasteur |


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise