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
  • Labels:
    None
  • Number of attachments :
    0

Description

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 -

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

Show
Charles Oliver Nutter added a comment - I've committed a fix for this, but it needs a ByteList release.
Hide
Charles Oliver Nutter added a comment -

Tom did a bytelist release for RC1.

Show
Charles Oliver Nutter added a comment - Tom did a bytelist release for RC1.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: