mirror of
https://github.com/rubyjs/therubyrhino
synced 2023-03-27 23:21:34 -04:00
Change from internal 'Java::JavaLang' to recommended 'java.lang'
The JRuby team recommends using the package/method-call-style notation. The camel-cased module name mapping is not intended for public consumption.
This commit is contained in:
parent
d08b275b77
commit
0be2d0ee2d
2 changed files with 6 additions and 6 deletions
|
@ -31,7 +31,7 @@ module Rhino
|
|||
# end
|
||||
#
|
||||
# == Notes
|
||||
# While there are many similarities between Rhino::Context and Java::OrgMozillaJavascript::Context, they are not
|
||||
# While there are many similarities between Rhino::Context and Java::org.mozilla.javascript.Context, they are not
|
||||
# the same thing and should not be confused.
|
||||
|
||||
class Context
|
||||
|
@ -150,7 +150,7 @@ module Rhino
|
|||
|
||||
end
|
||||
|
||||
class IOReader < Java::JavaIo::Reader #:nodoc:
|
||||
class IOReader < java.io.Reader #:nodoc:
|
||||
|
||||
def initialize(io)
|
||||
@io = io
|
||||
|
@ -162,14 +162,14 @@ module Rhino
|
|||
if str.nil?
|
||||
return -1
|
||||
else
|
||||
jstring = Java::JavaLang::String.new(str)
|
||||
jstring = java.lang.String.new(str)
|
||||
for i in 0 .. jstring.length - 1
|
||||
charbuffer[i + offset] = jstring.charAt(i)
|
||||
end
|
||||
return jstring.length
|
||||
end
|
||||
rescue StandardError => e
|
||||
raise Java::JavaIo::IOException.new, "Failed reading from ruby IO object"
|
||||
raise java.io.IOException.new, "Failed reading from ruby IO object"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -53,7 +53,7 @@ describe Rhino::To do
|
|||
it "it unwraps wrapped java objects" do
|
||||
Context.open do |cx|
|
||||
scope = cx.scope
|
||||
Java::JavaLang::String.new("Hello World").tap do |str|
|
||||
java.lang.String.new("Hello World").tap do |str|
|
||||
J::NativeJavaObject.new(scope.j, str, str.getClass()).tap do |o|
|
||||
To.ruby(o).should == "Hello World"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue