Skip to content

Remove unused result_new local in get_ruby_value_from_result_set#273

Merged
yahonda merged 1 commit intorsim:masterfrom
yahonda:fix-unused-result-new-jdbc-connection
Apr 20, 2026
Merged

Remove unused result_new local in get_ruby_value_from_result_set#273
yahonda merged 1 commit intorsim:masterfrom
yahonda:fix-unused-result-new-jdbc-connection

Conversation

@yahonda
Copy link
Copy Markdown
Collaborator

@yahonda yahonda commented Apr 19, 2026

Summary

  • get_ruby_value_from_result_set assigned its return value to a local result_new that was never read.
  • Under RUBYOPT=-w (seen on the JRuby head CI job) this produced lib/plsql/jdbc_connection.rb:381: warning: assigned but unused variable - result_new.
  • Drop the assignment and return the expression directly; no behavior change (the caller at lib/plsql/jdbc_connection.rb:222 still receives the converted Ruby value).

Test plan

  • ruby -c lib/plsql/jdbc_connection.rb passes.
  • Re-run CI (including JRuby head) and confirm the jdbc_connection.rb:381 warning is gone.
  • Cursor-exercising specs (e.g. spec/plsql/procedure_spec.rb, spec/plsql/sql_statements_spec.rb) still pass against a live Oracle DB.

Remaining warnings in that CI run originate from activesupport / activerecord / JRuby and are out of scope for this repo.

Generated with Claude Code

Running specs under `RUBYOPT=-w` (e.g. JRuby head CI) surfaced:

    lib/plsql/jdbc_connection.rb:381: warning: assigned but unused
    variable - result_new

The variable was assigned but never read; the method already returned
the converted value. Dropping the assignment silences the warning
without changing behavior.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes an unused local variable assignment in get_ruby_value_from_result_set that triggers a Ruby warning under RUBYOPT=-w, without changing behavior.

Changes:

  • Remove the unused result_new local by returning ora_value_to_ruby_value(ora_value) directly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yahonda yahonda merged commit e3cf201 into rsim:master Apr 20, 2026
25 checks passed
@yahonda yahonda deleted the fix-unused-result-new-jdbc-connection branch April 20, 2026 00:18
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