Project

General

Profile

Bug #10732

rdoc:ファイル中に単独の\rがあるとrdocがハングアップする

Added by vmi (Motonori IWAMURO) almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
[ruby-dev:48813]

Description

以下で再現できます。

echo -e '\ra\t' > dummy.txt
rdoc dummy.txt

原因は、rdoc/text.rbのexpand_tabsで、each_line が上記のダミーデータを1行扱いするのに、gsub!の正規表現にマッチせず、until line !~ /\t/ が無限ループになるためです。
(libyajl2 のインストールでri/rdocの処理が終わらないのはこれが原因)

Associated revisions

Revision 77f31255
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

rdoc/text.rb: fix infinite loop

  • lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with CR. should check if substitution occurred too. [ruby-dev:48813] [Bug #10732]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 49223
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

rdoc/text.rb: fix infinite loop

  • lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with CR. should check if substitution occurred too. [ruby-dev:48813] [Bug #10732]

Revision 49223
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

rdoc/text.rb: fix infinite loop

  • lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with CR. should check if substitution occurred too. [ruby-dev:48813] [Bug #10732]

Revision 49223
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

rdoc/text.rb: fix infinite loop

  • lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with CR. should check if substitution occurred too. [ruby-dev:48813] [Bug #10732]

Revision 49223
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

rdoc/text.rb: fix infinite loop

  • lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with CR. should check if substitution occurred too. [ruby-dev:48813] [Bug #10732]

Revision 49223
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

rdoc/text.rb: fix infinite loop

  • lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with CR. should check if substitution occurred too. [ruby-dev:48813] [Bug #10732]

Revision 9dd9feab
Added by naruse (Yui NARUSE) almost 5 years ago

merge revision(s) 49223: [Backport #10732]

    * lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with
      CR.  should check if substitution occurred too.
      [ruby-dev:48813] [Bug #10732]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 49327
Added by naruse (Yui NARUSE) almost 5 years ago

merge revision(s) 49223: [Backport #10732]

* lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with
  CR.  should check if substitution occurred too.
  [ruby-dev:48813] [Bug #10732]

Revision d6500091
Added by usa (Usaku NAKAMURA) almost 5 years ago

merge revision(s) 49223: [Backport #10732]

    * lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with
      CR.  should check if substitution occurred too.
      [ruby-dev:48813] [Bug #10732]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@49445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 49445
Added by usa (Usaku NAKAMURA) almost 5 years ago

merge revision(s) 49223: [Backport #10732]

* lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with
  CR.  should check if substitution occurred too.
  [ruby-dev:48813] [Bug #10732]

Revision 6a339774
Added by nagachika (Tomoyuki Chikanaga) almost 5 years ago

merge revision(s) r49223: [Backport #10732]

    * lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with
      CR.  should check if substitution occurred too.
      [ruby-dev:48813] [Bug #10732]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@49629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 49629
Added by nagachika (Tomoyuki Chikanaga) almost 5 years ago

merge revision(s) r49223: [Backport #10732]

* lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with
  CR.  should check if substitution occurred too.
  [ruby-dev:48813] [Bug #10732]

History

Updated by nobu (Nobuyoshi Nakada) almost 5 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r49223.


rdoc/text.rb: fix infinite loop

  • lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with CR. should check if substitution occurred too. [ruby-dev:48813] [Bug #10732]
#2

Updated by usa (Usaku NAKAMURA) almost 5 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED

Updated by naruse (Yui NARUSE) almost 5 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE

ruby_2_2 r49327 merged revision(s) 49223.

Updated by usa (Usaku NAKAMURA) almost 5 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE to 2.0.0: DONE, 2.1: REQUIRED, 2.2: DONE

ruby_2_0_0 r49445 merged revision(s) 49223.

Updated by nagachika (Tomoyuki Chikanaga) almost 5 years ago

  • Backport changed from 2.0.0: DONE, 2.1: REQUIRED, 2.2: DONE to 2.0.0: DONE, 2.1: DONE, 2.2: DONE

Backported into ruby_2_1 at r49629.

Also available in: Atom PDF