changelog shortlog tags changeset manifest revisions annotate raw

vendor/plugins/rspec/lib/spec/example/module_reopening_fix.rb

changeset 15: 64acf98d15f4
author: moriq@moriq.com
date: Mon Mar 10 10:12:58 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: add plugins rspec
1module 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
21end