git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
svn 2017-05-27 21:55:03 +00:00
Родитель ead4095935
Коммит 33319b8833
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -9,35 +9,35 @@ describe "The undef keyword" do
@obj = @undef_class.new
@obj.meth(5).should == 5
end
it "with an identifier" do
@undef_class.class_eval do
undef meth
end
lambda { @obj.meth(5) }.should raise_error(NoMethodError)
end
it "with a simple symbol" do
@undef_class.class_eval do
undef :meth
end
lambda { @obj.meth(5) }.should raise_error(NoMethodError)
end
it "with a single quoted symbol" do
@undef_class.class_eval do
undef :'meth'
end
lambda { @obj.meth(5) }.should raise_error(NoMethodError)
end
it "with a double quoted symbol" do
@undef_class.class_eval do
undef :"meth"
end
lambda { @obj.meth(5) }.should raise_error(NoMethodError)
end
it "with a interpolated symbol" do
@undef_class.class_eval do
undef :"#{'meth'}"