Feature #21105
Updated by ennder (Jérôme BATAILLE) 4 days ago
## h2. Subject Improve Ruby Stack Trace to Include Exact Error Position (Column Number) ## h2. Description Currently, when an exception occurs in Ruby, the stack trace provides the file name and line number but does not indicate the exact position (column number) where the error occurred within the line. This lack of precision can make debugging more challenging, especially in cases where multiple method calls or expressions are present on the same line. ## h2. Example ``` ruby <pre><code class="ruby"> class Example def self.run nil.some_method_call # Error occurs here end end Example.run </code></pre> ``` ## h2. Expected Behavior The stack trace should include the column number where the error occurred, e.g.: ``` ruby <pre><code> trace.rb:4:10:in `run': undefined method `some_method_call' for nil:NilClass (NoMethodError) ``` ## </code></pre> h2. Benefits More precise debugging. Easier identification of errors in complex one-liner expressions. Better tooling support for editors and debuggers. ## h2. Additional Notes Would it be possible to add this enhancement in a future Ruby version? Thank you for considering this request!