Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: JRuby 1.4
    • Fix Version/s: None
    • Component/s: HelpWanted, Intro, Ruby 1.9.2
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Right now the code is commented in RubyIO.java:3524 because I don't know how ruby 1.9 handles these options

        Activity

        Nick Sieger made changes -
        Field Original Value New Value
        Component/s HelpWanted [ 14060 ]
        Component/s Ruby 1.9 [ 13724 ]
        Hide
        Thomas E Enebo added a comment -

        As David points out...This is partially implemented, but commented out in RubyIO.java. The work neccesary to fix this is to audit Ruby 1.9 source code and figure out how to hook up and process these options.

        Show
        Thomas E Enebo added a comment - As David points out...This is partially implemented, but commented out in RubyIO.java. The work neccesary to fix this is to audit Ruby 1.9 source code and figure out how to hook up and process these options.
        Thomas E Enebo made changes -
        Component/s Intro [ 14308 ]
        Assignee Thomas E Enebo [ enebo ]
        Affects Version/s JRuby 1.4 [ 15285 ]
        Hide
        Martin Harriman added a comment -

        I can finish this work.

        The MRI 1.9 behavior for :binmode and :textmode:

        If either (or both) of these keys are present, with a truthy value, they are equivalent to the 'b' or 't' characters in the mode string, respectively, except for the error raised. Setting both 'b' and 't' in the mode string raises an argument error for "invalid access mode %s" (where %s is the mode string). If both binmode and textmode are requested through the hash keys, possibly in combination with the mode string, the argument error message text is "both textmode and binmode specified".

        The mode string is parsed first, so if you set 'b' and 't' there you get the "invalid access mode" message text in the exception, and the values in the hash do not matter.

        Except for the message in the exception, :binmode is exactly equivalent to mode 'b' and :textmode is exactly equivalent to mode 't'.

        Show
        Martin Harriman added a comment - I can finish this work. The MRI 1.9 behavior for :binmode and :textmode: If either (or both) of these keys are present, with a truthy value, they are equivalent to the 'b' or 't' characters in the mode string, respectively, except for the error raised. Setting both 'b' and 't' in the mode string raises an argument error for "invalid access mode %s" (where %s is the mode string). If both binmode and textmode are requested through the hash keys, possibly in combination with the mode string, the argument error message text is "both textmode and binmode specified". The mode string is parsed first, so if you set 'b' and 't' there you get the "invalid access mode" message text in the exception, and the values in the hash do not matter. Except for the message in the exception, :binmode is exactly equivalent to mode 'b' and :textmode is exactly equivalent to mode 't'.
        Hide
        Martin Harriman added a comment - - edited

        (double post, curse this browser)

        Show
        Martin Harriman added a comment - - edited (double post, curse this browser)
        Hide
        Charles A. Lanahan added a comment -

        Is this still unresolved? I went hunting for the sections mentioned but no comment exists there anymore?

        Show
        Charles A. Lanahan added a comment - Is this still unresolved? I went hunting for the sections mentioned but no comment exists there anymore?
        Hide
        Hiro Asari added a comment - - edited

        Charles,

        As far as I know, this is still unresolved. The comment David mentions is still there; just not on the same lines. https://github.com/jruby/jruby/blob/21ea42097e89c3a70c2971b1209fb39410d6b975/src/org/jruby/RubyIO.java#L4061-4079

        By the way, you can look at what commits are made to a file up until a certain date. For example:

        git log --until={2009/09/03} src/org/jruby/RubyIO.java
        
        Show
        Hiro Asari added a comment - - edited Charles, As far as I know, this is still unresolved. The comment David mentions is still there; just not on the same lines. https://github.com/jruby/jruby/blob/21ea42097e89c3a70c2971b1209fb39410d6b975/src/org/jruby/RubyIO.java#L4061-4079 By the way, you can look at what commits are made to a file up until a certain date. For example: git log --until={2009/09/03} src/org/jruby/RubyIO.java
        Hide
        Charles Oliver Nutter added a comment -

        It looks like Hiro merged in a commit from Martin to handle binmode, at least, in 601a0f65c77ad37b5440c9983eb8f0d2b42d9643, which I merged to jruby-1_6 just now. textmode is still outstanding, I believe.

        Show
        Charles Oliver Nutter added a comment - It looks like Hiro merged in a commit from Martin to handle binmode, at least, in 601a0f65c77ad37b5440c9983eb8f0d2b42d9643, which I merged to jruby-1_6 just now. textmode is still outstanding, I believe.

          People

          • Assignee:
            Unassigned
            Reporter:
            David Calavera
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: