[#41916] Proposal: Bitmap Marking GC — Narihiro Nakamura <authornari@...>

Hi.

18 messages 2012/01/05

[#41941] [ruby-trunk - Bug #5851][Open] make check fails when compiling with GCC 4.7 - *** longjmp causes uninitialized stack frame *** — Vit Ondruch <v.ondruch@...>

12 messages 2012/01/06

[#41979] [ruby-trunk - Bug #5865][Open] Exception#== should return false if the classes differ — Hiro Asari <asari.ruby@...>

10 messages 2012/01/08

[#42003] [ruby-trunk - Bug #5871][Open] regexp \W matches some word characters when inside a case-insensitive character class — Gareth Adams <gareth@...>

14 messages 2012/01/09

[#42016] [ruby-trunk - Feature #5873][Open] Adopt FFI over DL — Heesob Park <phasis@...>

15 messages 2012/01/10

[#42149] [ruby-trunk - Feature #5899][Open] chaining comparsions. — Ondrej Bilka <neleai@...>

12 messages 2012/01/16

[#42164] [ruby-trunk - Feature #5903][Open] Optimize st_table (take 2) — Yura Sokolov <funny.falcon@...>

18 messages 2012/01/17

[ruby-core:42133] [ruby-trunk - Bug #5892][Rejected] REXML always wraps long tag text regardless the page width setting.

From: Kouhei Sutou <kou@...>
Date: 2012-01-15 04:32:00 UTC
List: ruby-core #42133
Issue #5892 has been updated by Kouhei Sutou.

Status changed from Assigned to Rejected
% Done changed from 0 to 100

=begin
It seems that this had been fixed in Ruby 1.9.3. Please update your ruby or request a backport for r31997 and r31998. (ayumin will backport them. :-) See also #4498.

Ruby 1.9.3p0:
  % ruby1.9.1  -v /tmp/XML_text_wrapping.rb
  ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
  <?xml version='1.0' encoding='UTF-8'?>
  <msg xmlns='http://www.example.com/xml/foo'>
    <foo:bar>
      123456789 123456789 123456789 123456789 123456789 123456789 123456789
      123456789 123456789 123456789 123456789 123456789 123456789 123456789
      123456789 123456789 123456789 123456789 123456789 123456789 
    </foo:bar>
  </msg><?xml version='1.0' encoding='UTF-8'?>
  <msg xmlns='http://www.example.com/xml/foo'>
    <foo:bar>
      123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 
    </foo:bar>
  </msg>/tmp/XML_text_wrapping.rb:52: warning: method redefined; discarding old write_text
  /usr/lib/ruby/1.9.1/rexml/formatters/pretty.rb:87: warning: previous definition of write_text was here
  <?xml version='1.0' encoding='UTF-8'?>
  <msg xmlns='http://www.example.com/xml/foo'>
    <foo:bar>
      123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 
    </foo:bar>
  </msg>

Ruby trunk (r34305):
  % /tmp/local/bin/ruby -v /tmp/XML_text_wrapping.rb
  ruby 2.0.0dev (2012-01-14 trunk 34305) [x86_64-linux]
  <?xml version='1.0' encoding='UTF-8'?>
  <msg xmlns='http://www.example.com/xml/foo'>
    <foo:bar>
      123456789 123456789 123456789 123456789 123456789 123456789 123456789
      123456789 123456789 123456789 123456789 123456789 123456789 123456789
      123456789 123456789 123456789 123456789 123456789 123456789 
    </foo:bar>
  </msg><?xml version='1.0' encoding='UTF-8'?>
  <msg xmlns='http://www.example.com/xml/foo'>
    <foo:bar>
      123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 
    </foo:bar>
  </msg>/tmp/XML_text_wrapping.rb:52: warning: method redefined; discarding old write_text
  /tmp/local/lib/ruby/2.0.0/rexml/formatters/pretty.rb:87: warning: previous definition of write_text was here
  <?xml version='1.0' encoding='UTF-8'?>
  <msg xmlns='http://www.example.com/xml/foo'>
    <foo:bar>
      123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 
    </foo:bar>
  </msg>
=end
----------------------------------------
Bug #5892: REXML always wraps long tag text regardless the page width setting.
https://bugs.ruby-lang.org/issues/5892

Author: Dimitri Geshef
Status: Rejected
Priority: Normal
Assignee: Kouhei Sutou
Category: lib
Target version: 1.9.2
ruby -v: ruby 1.9.2p180 (2011-02-18) [i386-mingw32]


When ones prints a REXML document that contains a tag with a long text (with space chars), the REXML::Formatters::Pretty formatter will force a line wrapping at column 80.
If one changes the value of the width attribute of the formatter to a very large value does not change the result.
In other words, the formatter ignores the value of the 'width' attribute.
The REXML version used is:
  REXML VERSION = "3.1.7.3"
  REXML REVISION = 26193 

Apparently, the defect lies in the method REXML::Formatters::Pretty#write_text.
There is a statement with a hardcoded value of 80.
Look in the .rb file in attachment for a possible fix of this bug.



-- 
http://bugs.ruby-lang.org/

In This Thread

Prev Next