On Mar 12, 2008, at 11:49 AM, Mario Ruiz wrote:

> I'm trying to create different scenarios so I thought to do something
> like:
>
> file:scenarios.rb
> ------------------
> module Scenarios
>  module Default
>    $bab="defaultmodulevalue"
>  end
>  module DefaultHidden
>    $bab="hiddenmodulevalue"
>  end
>  module DefaultSecond
>    $bab="secondmodulevalue"
>  end
> end
>
> file:mytest.rb
> ---------------
> require 'scenarios.rb'
> include Scenarios::Default
> ...
> puts $bab
>
> --------------
>
> but it doesn't matter which module I include I always have the same
> respond:
> "secondmodulevalue"
>
> Any ideas for resolving this?
>
> Thanks.


Uh, stop using global variables?

-Rob

Rob Biedenharn		http://agileconsultingllc.com
Rob / AgileConsultingLLC.com