Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Aug 28, 2025

What this does

This makes the overriden methods #instance_variables public for the Chat and Connection classes.

The purpose of this change is to make the ls command in IRB work. This command relies on the #instance_variables method to list the object's instance variables. For current Chat and Connection objects this fails and raises an error instead.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Performance improvement

Scope check

  • I read the Contributing Guide
  • This aligns with RubyLLM's focus on LLM communication
  • This isn't application-specific logic that belongs in user code
  • This benefits most users, not just my specific use case

This change is orthogonal to LLM communication.

Quality check

  • I ran overcommit --install and all hooks pass
  • I tested my changes thoroughly
  • I updated documentation if needed
  • 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

Copy link

codecov bot commented Aug 28, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.06%. Comparing base (19f984d) to head (b725715).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/ruby_llm/chat.rb 50.00% 1 Missing ⚠️
lib/ruby_llm/connection.rb 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #374   +/-   ##
=======================================
  Coverage   88.06%   88.06%           
=======================================
  Files          95       95           
  Lines        3754     3754           
  Branches      787      787           
=======================================
  Hits         3306     3306           
  Misses        448      448           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@crmne crmne merged commit 9d5c277 into crmne:main Aug 28, 2025
14 checks passed
@crmne
Copy link
Owner

crmne commented Aug 28, 2025

Nice one!

@mvz mvz deleted the public-instance-variables-method branch August 28, 2025 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants