JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-3137

Update JavaUtil.coerceNumericToType() to coerce numerics to the Java Serializable interface

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.1.5
    • Fix Version/s: JRuby 1.6
    • Component/s: Intro, Java Integration
    • Labels:
      None
    • Environment:
      Soylatte 1.0.3
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      Currently, if you try to pass a Ruby Fixnum to a Java method whose argument type is Serializable, it fails with a message that it can't coerce a Fixnum to Serializable. Well, I'm not going to accept such a defeatist attitude!!! Yes, we can coerce a Fixnum to Serializable, and this patch proves it.

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        Looks like a good fix..got a spec we can apply as well?

        Show
        Charles Oliver Nutter added a comment - Looks like a good fix..got a spec we can apply as well?
        Hide
        Charles Oliver Nutter added a comment -

        This still needs to be fixed and is part of the "new JI" we discussed a bit on the mailing list. We have a solution and a path forward, but not for 1.4.

        Show
        Charles Oliver Nutter added a comment - This still needs to be fixed and is part of the "new JI" we discussed a bit on the mailing list. We have a solution and a path forward, but not for 1.4.
        Hide
        Hiro Asari added a comment -

        Charlie, can you confirm that this is fixed now? JavaUtil.java looks quite different from what the patch suggests.

        Show
        Hiro Asari added a comment - Charlie, can you confirm that this is fixed now? JavaUtil.java looks quite different from what the patch suggests.
        Hide
        Charles Oliver Nutter added a comment -

        Pretty sure I fixed this in 1.6.

        Show
        Charles Oliver Nutter added a comment - Pretty sure I fixed this in 1.6.

          People

          • Assignee:
            Unassigned
            Reporter:
            Michael S. Allman
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: