We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4f1a91 commit 3270443Copy full SHA for 3270443
core/module/set_temporary_name_spec.rb
@@ -116,5 +116,26 @@ module m::N; end
116
m.set_temporary_name("foo")
117
m::N.name.should =~ /\A#<Module:0x\h+>::N\z/
118
end
119
+
120
+ it "keeps temporary name when assigned in an anonymous module" do
121
+ outer = Module.new
122
+ m = Module.new
123
+ m.set_temporary_name "m"
124
+ m.name.should == "m"
125
+ outer::M = m
126
127
+ m.inspect.should == "m"
128
+ end
129
130
+ it "keeps temporary name when assigned in an anonymous module and nested before" do
131
132
133
+ outer::A = m
134
135
136
137
138
139
140
141
0 commit comments