Skip to content

Commit

Permalink
Don’t set up a tracepoint unless the subclass has a name
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Jan 17, 2025
1 parent 349c6f9 commit 68410b9
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 @@ -24,7 +24,7 @@ def inherited(subclass)
@names = {}
end

if RUBY_ENGINE != "truffleruby"
if subclass.name && RUBY_ENGINE != "truffleruby"
TracePoint.trace(:end) do |tp|
if tp.self == subclass
tp.self.__after_defined__
Expand Down

0 comments on commit 68410b9

Please sign in to comment.