This project is archived and is in readonly mode.

#2546 ✓invalid
Gareth Adams

render :text => Proc

Reported by Gareth Adams | April 23rd, 2009 @ 10:40 AM | in 3.x

As described at http://pastie.org/455603

Using render :text with a Proc causes unusual errors


class FoosController < ApplicationController
  def bar
    render :text => lambda { |response, output|
      Foo.new.inspect
      output.write "Blah"
    }
  end
end

Line 4 generates the error "Read error: #<ArgumentError: A copy of FoosController has been removed from the module tree but is still active!>". If I remove line 4, or place it outside the lambda, no error occurs and "Blah" is successfully output

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages