Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dfb56fe5cc4b
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dbbfe588433c
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Mar 29, 2016

  1. Copy the full SHA
    eb7ccbd View commit details
  2. Copy the full SHA
    dbbfe58 View commit details
Showing with 11 additions and 2 deletions.
  1. +7 −0 core/src/main/java/org/jruby/javasupport/JavaPackage.java
  2. +1 −1 lib/ruby/stdlib/net/http.rb
  3. +3 −1 spec/java_integration/packages/name_spec.rb
7 changes: 7 additions & 0 deletions core/src/main/java/org/jruby/javasupport/JavaPackage.java
Original file line number Diff line number Diff line change
@@ -116,6 +116,13 @@ public IRubyObject inspect() {
return getRuntime().newString(getName()); // super.to_s()
}

@Override
@JRubyMethod(name = "===")
public RubyBoolean op_eqq(ThreadContext context, IRubyObject obj) {
// maybe we could handle java.lang === java.lang.reflect as well ?
return context.runtime.newBoolean(obj == this || isInstance(obj));
}

@JRubyMethod(name = "const_missing", required = 1, visibility = Visibility.PRIVATE)
public IRubyObject const_missing(final ThreadContext context, final IRubyObject name) {
return relativeJavaClassOrPackage(context, name, false);
2 changes: 1 addition & 1 deletion lib/ruby/stdlib/net/http.rb
Original file line number Diff line number Diff line change
@@ -948,7 +948,7 @@ def connect
if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE
s.post_connection_check(@address)
end
# Commented out until JRuby implements OpenSSL::SSL::Session
# OpenSSL::SSL::Session somehow works but SSLSocket#session= does nothing with JRuby-OpenSSL
#@ssl_session = s.session
rescue => exception
D "Conn close because of connect error #{exception}"
4 changes: 3 additions & 1 deletion spec/java_integration/packages/name_spec.rb
Original file line number Diff line number Diff line change
@@ -32,7 +32,9 @@
expect( org.xml == org.xml.sax ).to be false
expect( org.xml.eql? Java::org::xml ).to be true
expect( Java::OrgXmlSax.equal?org.xml.sax ).to be true
#expect( Java::OrgXmlSax === org.xml.sax ).to be true
expect( Java::OrgXmlSax === org.xml.sax ).to be true
expect( Java::OrgXml === org.xml.sax ).to be false
expect( Java::OrgXml === org ).to be false
end

it 'have package name' do