What would this Java construct equate to in JRuby?

I'm in the process of porting some Java processing code to ruby-processing, and I'm stumped by this Java construct:

new GLTexture[]{tex2, tex4, tex8, tex16}

tex2, tex4 etc are all instances of GLTexture.

It obviously maps those arguments to the GLTexture constructor somehow, but I can't see any constructors that don't require a processing.core.PApplet instance. Google is not much help as it's quite difficult to search for punctuation []{...}.

What would the equivalent of this construct be in JRuby?

Answers


In ruby, this would just be [tex2, tex4, tex8, tex16]


Need Your Help

Scrum burn down charts, can they go negative?

charts agile scrum agile-processes burndowncharts

I work on a small Agile development team which is part of a large, non-agile thinking corporation. Currently, we practise Scrum and occasionally, we exceed our sprint commitment.

My events are being dispatched but nothing is happening? Do they have scope?

flex actionscript-3 actionscript flex3

I have a flex app under construction that makes use of a lot of . I have a main module that has child modules. Ugh, I know. in one of these sub-modules, i want to know if i click a button. The hand...