Details

    • Number of attachments :
      1

      Description

      jruby's implementation of TCPSocket#new does not accept nil values for local_addr and local_port, as in:

      TCPSocket.new('someplace', 1234, nil, nil)

      Raises an exception. On MRI it silently ignores the nil values. RBX recently fixed theirs to behave as MRI does.

        Activity

        Hide
        Dan Tylenda-Emmons added a comment -

        You can assign this to me if you'd like. @codertrader

        Show
        Dan Tylenda-Emmons added a comment - You can assign this to me if you'd like. @codertrader
        Hide
        Hiro Asari added a comment -

        Dan,

        Thank you for the offer. However, we can't do that, since you're not registered as a project member.

        For now, the one who gets the patch accepted will get the credit for the fix.

        Show
        Hiro Asari added a comment - Dan, Thank you for the offer. However, we can't do that, since you're not registered as a project member. For now, the one who gets the patch accepted will get the credit for the fix.
        Hide
        Dan Tylenda-Emmons added a comment -

        gotchya. where do you accept patches? here or git?

        Show
        Dan Tylenda-Emmons added a comment - gotchya. where do you accept patches? here or git?
        Hide
        Hiro Asari added a comment -

        Personally, I prefer a git patch attached here, but we do accept pull requests on github.

        Show
        Hiro Asari added a comment - Personally, I prefer a git patch attached here, but we do accept pull requests on github.
        Hide
        Dan Tylenda-Emmons added a comment -

        Ok, i have the 1 line fix. need to create a patch file now

        Show
        Dan Tylenda-Emmons added a comment - Ok, i have the 1 line fix. need to create a patch file now
        Hide
        Dan Tylenda-Emmons added a comment -

        basically this is the change:

        int localPort = args.length == 4 && !args[3].isNil() ? getPortFrom(context.getRuntime(), args[3]) : 0;

        Show
        Dan Tylenda-Emmons added a comment - basically this is the change: int localPort = args.length == 4 && !args [3] .isNil() ? getPortFrom(context.getRuntime(), args [3] ) : 0;
        Hide
        Duncan Mak added a comment -

        Oh, I was on IRC with headius and I also made the same fix.

        I just submitted a pull request for the fix:

        https://github.com/duncanmak/jruby/commit/6b748c610ed4be56488b5c8057668722580d9e6e

        I did make a typo in my commit message - sigh.

        Show
        Duncan Mak added a comment - Oh, I was on IRC with headius and I also made the same fix. I just submitted a pull request for the fix: https://github.com/duncanmak/jruby/commit/6b748c610ed4be56488b5c8057668722580d9e6e I did make a typo in my commit message - sigh.
        Hide
        Dan Tylenda-Emmons added a comment -

        attached the patch file here because i've been having git problems

        Show
        Dan Tylenda-Emmons added a comment - attached the patch file here because i've been having git problems
        Hide
        Hiro Asari added a comment -

        Since the two patches are identical, I applied it to the master (e1c4597) and the 1.6 branch (b7693e2) and gave credit to both of you.

        Thank you!

        Show
        Hiro Asari added a comment - Since the two patches are identical, I applied it to the master (e1c4597) and the 1.6 branch (b7693e2) and gave credit to both of you. Thank you!

          People

          • Assignee:
            Hiro Asari
            Reporter:
            Eric Will
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: