Reputation: 3245
Since jruby knows how to translate a ruby set of instruction into java ones, then is it also possible that jruby knows which ruby construct corresponds to a given java instructions?
Is it possible for jruby to make a reverse translation from java instructions to ruby ones ?
Has something similar already been implemented so far?
Thanks
Upvotes: 1
Views: 1072
Reputation: 11026
Just like you don't need to know how to make a cake in order to eat a cake, JRuby does not need to know how to convert java code into ruby code, so I don't think you will find this feature.
Of course, JRuby does know (thankfully) how to convert some Java types (particularly primitives, but also Array and hashes) into their ruby equivalents, but this is not what you asked.
Upvotes: 2