JRuby

ByteList.shallowDup does not propagate length correctly

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.2
  • Fix Version/s: JRuby 1.3
  • Component/s: Core Classes/Modules
  • Description:
    Hide

    There's a problem with shallowDup in ByteList:

    $ jruby -rjava -e "import org.jruby.util.ByteList; b = ByteList.new(5); b.append('foo'.to_java_bytes); p b.length; p b.shallowDup.length"
    3
    5
    

    This is the actual cause of the problem reported in JRUBY-3511.

    Show
    There's a problem with shallowDup in ByteList:
    $ jruby -rjava -e "import org.jruby.util.ByteList; b = ByteList.new(5); b.append('foo'.to_java_bytes); p b.length; p b.shallowDup.length"
    3
    5
    
    This is the actual cause of the problem reported in JRUBY-3511.

Activity

Hide
Charles Oliver Nutter added a comment - 15/Apr/09 5:37 PM

I've committed a fix for this, but it needs a ByteList release.

Show
Charles Oliver Nutter added a comment - 15/Apr/09 5:37 PM I've committed a fix for this, but it needs a ByteList release.
Hide
Charles Oliver Nutter added a comment - 30/May/09 6:54 PM

Tom did a bytelist release for RC1.

Show
Charles Oliver Nutter added a comment - 30/May/09 6:54 PM Tom did a bytelist release for RC1.

People

Dates

  • Created:
    15/Apr/09 5:24 PM
    Updated:
    03/Jun/09 4:57 PM
    Resolved:
    30/May/09 6:54 PM