Sha256: 0b0d36fb643cb57262ac559a6a3f3eb6bfd086bf4e40021d067144d2c3248baa

Contents?: true

Size: 530 Bytes

Versions: 8

Compression:

Stored size: 530 Bytes

Contents

# This is to fix a (bug?) in jruby.
# typically, when a ruby symbol is passed into a native java function,
# it should be converted to a java string by jruby.
# unfortunately, this conversion does not seem to take place when the native
# java function is overloaded.
# This method allows me to specify :symbol.to_java_string,
# so that I do not need to create a Ruby string from a symbol,
# just so that i can get a native java string

class Symbol
  JString = java.lang.String
  def to_java_string
    to_java(JString)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cadet-0.1.5-java lib/cadet/helpers.rb
cadet-0.1.4-java lib/cadet/helpers.rb
cadet-0.1.3-java lib/cadet/helpers.rb
cadet-0.1.2-java lib/cadet/helpers.rb
cadet-0.1.1-java lib/cadet/helpers.rb
cadet-0.1.0-java lib/cadet/helpers.rb
cadet-0.0.9-java lib/cadet/helpers.rb
cadet-0.0.8-java lib/cadet/helpers.rb