summaryrefslogtreecommitdiff
path: root/spec/ruby/library/erb/defmethod/def_erb_method_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/erb/defmethod/def_erb_method_spec.rb')
-rw-r--r--spec/ruby/library/erb/defmethod/def_erb_method_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/ruby/library/erb/defmethod/def_erb_method_spec.rb b/spec/ruby/library/erb/defmethod/def_erb_method_spec.rb
index e1eca2f..6c46593 100644
--- a/spec/ruby/library/erb/defmethod/def_erb_method_spec.rb
+++ b/spec/ruby/library/erb/defmethod/def_erb_method_spec.rb
@@ -50,7 +50,11 @@ END
MY_INPUT4_FOR_ERB = input
class MyClass4ForErb
extend ERB::DefMethod
- erb = ERB.new(MY_INPUT4_FOR_ERB, nil, '<>')
+ if RUBY_VERSION >= '2.6'
+ erb = ERB.new(MY_INPUT4_FOR_ERB, trim_mode: '<>')
+ else
+ erb = ERB.new(MY_INPUT4_FOR_ERB, nil, '<>')
+ end
def_erb_method('render()', erb)
def initialize(items)
@items = items