Project

General

Profile

Actions

Bug #11842

closed

r53123 breaks some gems which use erb

Added by yui-knk (Kaneko Yuichiro) over 8 years ago. Updated about 8 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0dev (trunk 53153) [x86_64-darwin14]
[ruby-core:72374]

Description

r53123 breaks some gems which use erb.

Thor gem for example.
They set an instance variable "@output_buffer" to 4th argument (eoutvar) of ERB.new (here).
And change this instance variable from outside erb (here).

Example code of erb shows this usage of eoutvar.
I think we should revert r53123 and add a test case for this usage.

Failures:

  1) Thor::Actions#template allows using block helpers in the template
     Failure/Error: concat(result.strip + " world!")

     NoMethodError:
       undefined method `strip' for ["Hello\n"]:Array
     # ./spec/fixtures/group.thor:58:in `world'
     # (erb):1:in `template'
     # ./lib/thor/actions/file_manipulation.rb:116:in `block in template'
     # ./lib/thor/actions/create_file.rb:53:in `render'
     # ./lib/thor/actions/create_file.rb:62:in `block (2 levels) in invoke!'
     # ./lib/thor/actions/create_file.rb:62:in `open'
     # ./lib/thor/actions/create_file.rb:62:in `block in invoke!'
     # ./lib/thor/actions/empty_directory.rb:116:in `invoke_with_conflict_check'
     # ./lib/thor/actions/create_file.rb:60:in `invoke!'
     # ./lib/thor/actions.rb:94:in `action'
     # ./lib/thor/actions/create_file.rb:25:in `create_file'
     # ./lib/thor/actions/file_manipulation.rb:115:in `template'
     # ./spec/actions/file_manipulation_spec.rb:11:in `block in action'
     # ./spec/helper.rb:55:in `capture'
     # ./spec/actions/file_manipulation_spec.rb:11:in `action'
     # ./spec/actions/file_manipulation_spec.rb:160:in `block (3 levels) in <top (required)>'
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0