1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/core/symbol/name_spec.rb
2021-01-28 17:08:57 +01:00

19 lines
444 B
Ruby

require_relative '../../spec_helper'
ruby_version_is "3.0" do
describe "Symbol#name" do
it "returns string" do
:ruby.name.should == "ruby"
:.name.should == "ルビー"
end
it "returns same string instance" do
:"ruby_3".name.should.equal?(:ruby_3.name)
:"ruby_#{1+2}".name.should.equal?(:ruby_3.name)
end
it "returns frozen string" do
:symbol.name.should.frozen?
end
end
end