From: "mame (Yusuke Endoh) via ruby-core" Date: 2025-12-16T09:42:53+00:00 Subject: [ruby-core:124229] [Ruby Feature#6012] Proc#source_location also return the column Issue #6012 has been updated by mame (Yusuke Endoh). Status changed from Closed to Open I record the summary of the discussion regarding Matz's decision to revert this for now. The decision was based on a combination of several reasons: * Unclear use cases * The description of #6012 lacked a use case. * The use case presented in #21005 was not convincing. * Difficulty in changing `Binding#source_location` (#6012#note-24, #21005#note-19) * `Binding#source_location` still returns `[file, lineno]`. * Implementation issues: It was challenging to preserve the location information of `Kernel#binding` calls within the ISeq. * Compatibility issues: `eval(code, nil, *binding.source_location)` is used in several gems; adding column information would break them. * Related issues: * We may need to adjust Proc#source_location's position (#21784). * We need to discuss column units (bytes vs characters) (#21783). * Timing: We can still revert without compatibility issues at this point. ---------------------------------------- Feature #6012: Proc#source_location also return the column https://bugs.ruby-lang.org/issues/6012#change-115715 * Author: rogerdpack (Roger Pack) * Status: Open * Assignee: nobu (Nobuyoshi Nakada) ---------------------------------------- As originally suggested in http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/42418 Suggestion/feature request: have #source_location also return the beginning column where it was defined. ["test.rb", 8, 33] Thanks! -roger- -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/