File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -255,4 +255,9 @@ def test_with_check(*args)
255
255
code = '$a = 1; $b = 2; alias $b $a; p [$a, $b]; $b = 3; p [$a, $b]'
256
256
ruby_exe ( code ) . should == "[1, 1]\n [3, 3]\n "
257
257
end
258
+
259
+ it "supports aliasing twice the same global variables" do
260
+ code = '$a = 1; alias $b $a; alias $b $a; p [$a, $b]'
261
+ ruby_exe ( code ) . should == "[1, 1]\n "
262
+ end
258
263
end
Original file line number Diff line number Diff line change 1
1
slow:The alias keyword on top level defines the alias on Object
2
2
slow:The alias keyword can create a new global variable, synonym of the original
3
3
slow:The alias keyword can override an existing global variable and make them synonyms
4
+ slow:The alias keyword supports aliasing twice the same global variables
You can’t perform that action at this time.
0 commit comments