]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/rspec-1.1.2/lib/spec/example/module_reopening_fix.rb
Show whether a trace is public or private in the trace list, so that a user can easil...
[rails.git] / vendor / gems / rspec-1.1.2 / lib / spec / example / module_reopening_fix.rb
1 module Spec
2   module Example
3     # This is a fix for ...Something in Ruby 1.8.6??... (Someone fill in here please - Aslak)
4     module ModuleReopeningFix
5       def child_modules
6         @child_modules ||= []
7       end
8
9       def included(mod)
10         child_modules << mod
11       end
12
13       def include(mod)
14         super
15         child_modules.each do |child_module|
16           child_module.__send__(:include, mod)
17         end
18       end
19     end
20   end
21 end