Skip to content

Commit

Permalink
Update lib/new_relic/agent/method_tracer_helpers.rb
Browse files Browse the repository at this point in the history
Co-authored-by: James Bunch <fallwith@gmail.com>
  • Loading branch information
tannalynn and fallwith authored Jun 21, 2023
1 parent bce6d4a commit d97fabe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/new_relic/agent/method_tracer_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def clm_enabled?
# '#<Class:MyModule::MyClass>', or '#<Class:MyModule::MyClass(id: integer, attribute: string)>'
# Return the 'MyModule::MyClass' part of that string
def klass_name(object)
name = Regexp.last_match(1) if object.to_s =~ /^#<Class:([\w:]*).*>$/
name = Regexp.last_match(1) if object.to_s =~ /^#<Class:([\w:]+).*>$/
return name if name

raise "Unable to glean a class name from string '#{object}'"
Expand Down

0 comments on commit d97fabe

Please sign in to comment.