Skip to content

Commit aefe2d7

Browse files
tpaulshippycrmne
andauthored
Resolve Style/ModuleMemberExistenceCheck (#554)
## What this does <!-- Clear description of what this PR does and why --> Noticed that `bundle exec rubocop` was failing in main for me after a `bundle update` ## Type of change - [x] Bug fix - [ ] New feature - [ ] Breaking change - [ ] Documentation - [ ] Performance improvement ## Scope check - [x] I read the [Contributing Guide](https://github.com/crmne/ruby_llm/blob/main/CONTRIBUTING.md) - [x] This aligns with RubyLLM's focus on **LLM communication** - [x] This isn't application-specific logic that belongs in user code - [x] This benefits most users, not just my specific use case ## Quality check - [x] I ran `overcommit --install` and all hooks pass - [x] I tested my changes thoroughly - [x] For provider changes: Re-recorded VCR cassettes with `bundle exec rake vcr:record[provider_name]` - [x] All tests pass: `bundle exec rspec` - [x] I updated documentation if needed - [x] I didn't modify auto-generated files manually (`models.json`, `aliases.json`) ## API changes - [ ] Breaking change - [ ] New public methods/classes - [ ] Changed method signatures - [ ] No API changes ## Related issues <!-- Link issues: "Fixes #123" or "Related to #123" --> Co-authored-by: Carmine Paolino <[email protected]>
1 parent 28fd67b commit aefe2d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ruby_llm/tool.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def resolve_schema
186186
def resolve_direct_schema(schema)
187187
return extract_schema(schema.to_json_schema) if schema.respond_to?(:to_json_schema)
188188
return RubyLLM::Utils.deep_dup(schema) if schema.is_a?(Hash)
189-
if schema.is_a?(Class) && schema.instance_methods.include?(:to_json_schema)
189+
if schema.is_a?(Class) && schema.method_defined?(:to_json_schema)
190190
return extract_schema(schema.new.to_json_schema)
191191
end
192192

0 commit comments

Comments
 (0)