|
Re: java.lang.reflect.Array considered harmful?: msg#00033lang.jruby.user
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> |
|---|---|---|
| Previous by Date: | Re: java.lang.reflect.Array considered harmful?: 00033, Thomas E Enebo |
|---|---|
| Next by Date: | Re: java.lang.reflect.Array considered harmful?: 00033, wknaka |
| Previous by Thread: | Re: java.lang.reflect.Array considered harmful?i: 00033, Werner Schuster (murphee) |
| Next by Thread: | Re: java.lang.reflect.Array considered harmful?: 00033, Charles O Nutter |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |