Skip to content

Commit f0b510c

Browse files
authored
Merge pull request #599 from utilum/identifiy_future_ERB_versions
Make sure future versions of ERB are invoked appropriately
2 parents 006832e + 1934d55 commit f0b510c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/thor/actions/file_manipulation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def template(source, *args, &block)
117117
context = config.delete(:context) || instance_eval("binding")
118118

119119
create_file destination, nil, config do
120-
match = ERB.version.match(/(\d\.\d\.\d)/)
120+
match = ERB.version.match(/(\d+\.\d+\.\d+)/)
121121
capturable_erb = if match && match[1] >= "2.2.0" # Ruby 2.6+
122122
CapturableERB.new(::File.binread(source), :trim_mode => "-", :eoutvar => "@output_buffer")
123123
else

0 commit comments

Comments
 (0)