Skip to content

Commit

Permalink
Fix data property dup (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vagab authored Dec 4, 2024
1 parent df92a58 commit 8da5d29
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion lib/literal/data_property.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ def generate_initializer_assign_value(buffer = +"")
escaped_name <<
" : " <<
escaped_name <<
".dup.freeze\n"
".freeze\n"
end
end
1 change: 0 additions & 1 deletion test/data.test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class Empty < Literal::Data
person = Person.new(name:)

expect(person.name).to_be(:frozen?)
expect(person.name).not_to_equal?(name)
end

test "immutable attributes are not duplicated" do
Expand Down

0 comments on commit 8da5d29

Please sign in to comment.