ruby-changes:61357
From: aycabta <ko1@a...>
Date: Sun, 24 May 2020 23:52:58 +0900 (JST)
Subject: [ruby-changes:61357] 32e0ff26e0 (master): [ruby/rdoc] Delegate ERB args correctly
https://git.ruby-lang.org/ruby.git/commit/?id=32e0ff26e0 From 32e0ff26e0ea5887a79cbf1ffd81513a4f392d76 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Wed, 1 Apr 2020 05:18:54 +0900 Subject: [ruby/rdoc] Delegate ERB args correctly https://github.com/ruby/rdoc/commit/82ff37a822 diff --git a/lib/rdoc/erbio.rb b/lib/rdoc/erbio.rb index 820a25a..0d5f96e 100644 --- a/lib/rdoc/erbio.rb +++ b/lib/rdoc/erbio.rb @@ -20,11 +20,11 @@ class RDoc::ERBIO < ERB https://github.com/ruby/ruby/blob/trunk/lib/rdoc/erbio.rb#L20 ## # Defaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize - def initialize str, safe_level = nil, trim_mode = nil, eoutvar = 'io' + def initialize str, safe_level = nil, legacy_trim_mode = nil, legacy_eoutvar = 'io', trim_mode: nil, eoutvar: 'io' if RUBY_VERSION >= '2.6' super(str, trim_mode: trim_mode, eoutvar: eoutvar) else - super + super(str, safe_level, legacy_trim_mode, legacy_eoutvar) end end diff --git a/lib/rdoc/generator/darkfish.rb b/lib/rdoc/generator/darkfish.rb index c5d47ef..5049aa4 100644 --- a/lib/rdoc/generator/darkfish.rb +++ b/lib/rdoc/generator/darkfish.rb @@ -779,9 +779,9 @@ class RDoc::Generator::Darkfish https://github.com/ruby/ruby/blob/trunk/lib/rdoc/generator/darkfish.rb#L779 end if RUBY_VERSION >= '2.6' - template = klass.new template, trim_mode: '<>', eoutvar: erbout + template = klass.new template, trim_mode: '-', eoutvar: erbout else - template = klass.new template, nil, '<>', erbout + template = klass.new template, nil, '-', erbout end @template_cache[file] = template template -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/