On Nov 7, 1:11 pm, Alex Young <a... / blackkettle.org> wrote:
> Am I wrong in thinking that mod_ruby runs all scripts in the same
> interpreter, so they all share a namespace?

The following:

page-a.rb

#!/usr/local/bin/eruby
<%
class Foo
  def bar
    puts "Page A: Foo#bar<br>"
  end
end
def baz
  puts "Page A: baz<br>"
end
Foo.new.bar
baz
%>

page-b.rb:

#!/usr/local/bin/eruby
<%
class Foo
  def bar
    puts "Page B: Foo#bar<br>"
  end
end
def baz
  puts "Page B: baz<br>"
end
Foo.new.bar
baz
%>

works just fine.

I'm pretty new to both ruby and eruby, and only about to dive deeply
into the latter.
And yes, I've heard about some issues concerning the shared
interpreter, though I've yet to run into them.

The only problem so far was the need to turn on "RubyRequire auto-
reload".