Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: JRuby 0.9.0, JRuby 0.9.1, JRuby 0.9.2, JRuby 0.9.8, JRuby 0.9.9, JRuby 1.0.0RC1, JRuby 1.0.0RC2
    • Fix Version/s: JRuby 1.5
    • Component/s: Windows
    • Labels:
      None
    • Environment:
      Windows
    • Testcase included:
      yes
    • Number of attachments :
      5

      Description

      IO puts, each_byte, getc behave differently on windows w.r.t. CRLF handling compared to ruby 1.8.4

      Attached test passes under ruby 1.8.4 on windows XP, but fails under JRuby in several places.

      1. newlineFix-r6068.patch
        19 kB
        Koichiro Ohba
      2. newlinesFix.patch
        4 kB
        Ola Bini
      3. newlinesFix-koichiro.patch
        5 kB
        Koichiro Ohba
      4. RubyIO.patch
        1 kB
        Tiziano Merzi
      5. testIOWindows.rb
        2 kB
        Tim Azzopardi

        Issue Links

          Activity

          Hide
          Thomas E Enebo added a comment -

          Bumping to 1.1+ this should be enabled under new proposed command-line option in JRUBY-2283.

          Show
          Thomas E Enebo added a comment - Bumping to 1.1+ this should be enabled under new proposed command-line option in JRUBY-2283 .
          Hide
          Simon Rozet added a comment -
          Show
          Simon Rozet added a comment - This issue affects Sinatra with jRuby on Windows. See https://sinatra.lighthouseapp.com/projects/9779/tickets/284-use_in_file_templates-misses-__end__-marker-with-jruby-on-win32 for details
          Hide
          Nick Sieger added a comment -

          Still an issue. The entire ChannelStream needs to be revamped to deal w/ line separators.The patch here doesn't solve everything. Targeting 1.5 for now.

          Show
          Nick Sieger added a comment - Still an issue. The entire ChannelStream needs to be revamped to deal w/ line separators.The patch here doesn't solve everything. Targeting 1.5 for now.
          Hide
          Vladimir Sizikov added a comment -

          Also, this causes 2 test failures in rubicon's test_io.rb. Note: These test cases are currently excluded, so unexclude first to see the failures.

          D:\work\jruby-dev\jruby>jruby test/rubicon/test_io.rb
          Loaded suite test/rubicon/test_io
          Started
          ....................F...............F.........
          Finished in 0.614 seconds.
          
            1) Failure:
          test_pos=(TestIO)
              [test/rubicon/test_io.rb:721:in `test_pos='
               test/rubicon/test_io.rb:718:in `each'
               test/rubicon/test_io.rb:718:in `test_pos='
               test/rubicon/test_io.rb:708:in `open'
               test/rubicon/test_io.rb:708:in `test_pos=']:
          <5> expected but was
          <0>.
          
            2) Failure:
          test_seek(TestIO)
              [test/rubicon/test_io.rb:932:in `test_seek'
               test/rubicon/test_io.rb:929:in `each'
               test/rubicon/test_io.rb:929:in `test_seek'
               test/rubicon/test_io.rb:919:in `open'
               test/rubicon/test_io.rb:919:in `test_seek']:
          <5> expected but was
          <0>.
          
          Show
          Vladimir Sizikov added a comment - Also, this causes 2 test failures in rubicon's test_io.rb. Note : These test cases are currently excluded, so unexclude first to see the failures. D:\work\jruby-dev\jruby>jruby test/rubicon/test_io.rb Loaded suite test/rubicon/test_io Started ....................F...............F......... Finished in 0.614 seconds. 1) Failure: test_pos=(TestIO) [test/rubicon/test_io.rb:721:in `test_pos=' test/rubicon/test_io.rb:718:in `each' test/rubicon/test_io.rb:718:in `test_pos=' test/rubicon/test_io.rb:708:in `open' test/rubicon/test_io.rb:708:in `test_pos=']: <5> expected but was <0>. 2) Failure: test_seek(TestIO) [test/rubicon/test_io.rb:932:in `test_seek' test/rubicon/test_io.rb:929:in `each' test/rubicon/test_io.rb:929:in `test_seek' test/rubicon/test_io.rb:919:in `open' test/rubicon/test_io.rb:919:in `test_seek']: <5> expected but was <0>.
          Hide
          Nick Sieger added a comment -

          Fixed in 9d57dbc. Merry Christmas!

          Show
          Nick Sieger added a comment - Fixed in 9d57dbc. Merry Christmas!

            People

            • Assignee:
              Nick Sieger
              Reporter:
              Tim Azzopardi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: