File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 900
900
defined? ( DefinedSpecs ::Undefined ) . should be_nil
901
901
end
902
902
903
+ it "returns nil when the constant is not defined and the outer module implements .const_missing" do
904
+ defined? ( DefinedSpecs ::ModuleWithConstMissing ::Undefined ) . should be_nil
905
+ end
906
+
903
907
it "does not call .const_missing if the constant is not defined" do
904
908
DefinedSpecs . should_not_receive ( :const_missing )
905
909
defined? ( DefinedSpecs ::UnknownChild ) . should be_nil
Original file line number Diff line number Diff line change @@ -285,6 +285,12 @@ def method_no_args
285
285
end
286
286
end
287
287
288
+ module ModuleWithConstMissing
289
+ def self . const_missing ( const )
290
+ const
291
+ end
292
+ end
293
+
288
294
class SuperWithIntermediateModules
289
295
include IntermediateModule1
290
296
include IntermediateModule2
You can’t perform that action at this time.
0 commit comments