Skip to content

Commit

Permalink
Update enum.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Dec 19, 2024
1 parent 3a18bb5 commit f3c30a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/literal/enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def const_added(name)
def new(*args, **kwargs, &block)
raise ArgumentError if frozen?
new_object = super(*args, **kwargs, &nil)
new_object.instance_variable_set(:@__position__, @members.size)
new_object.instance_variable_set(:@__position__, @members.length)

new_object.instance_exec(&block) if block

Expand Down

0 comments on commit f3c30a7

Please sign in to comment.