Skip to content

Commit

Permalink
spec for Symbol#name to return a string even if dynamically generated
Browse files Browse the repository at this point in the history
  • Loading branch information
lxxxvi authored and eregon committed Jan 8, 2021
1 parent 1a3a0e5 commit df94ad8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/symbol/name_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

ruby_version_is "3.0" do
describe "Symbol#name" do
it "returns a string" do
:ruby.name.should == "ruby"
:ルビー.name.should == "ルビー"
:"ruby_#{1+2}".name.should == "ruby_3"
end

it "returns a frozen string" do
:symbol.name.should.frozen?
end
Expand Down

0 comments on commit df94ad8

Please sign in to comment.