[ruby-core:124430] [Ruby Feature#6012] Proc#source_location also return the column
Issue #6012 has been updated by mame (Yusuke Endoh). Eregon (Benoit Daloze) wrote in #note-44:
mame (Yusuke Endoh) wrote in #note-43: Why don't you consider the gems that need this functionality `method_source` (700 million downloads) and `proc_to_ast` (71 million downloads) as valid use cases?
First, I suspect that what many users of `method_source` gem actually need is the AST. The proposal #21005 itself demonstrates this. I recognize the use case of retrieving the AST subtree corresponding to some kinds of Ruby objects. However, `source_location` is not an appropriate key to look up the AST subtree corresponding to a Ruby object. At least for CRuby, `node_id` should be used, though I don't say you should implement `node_id` in TruffleRuby. Therefore, the valid use case for `source_location` itself is not clear yet, IMO. ---------------------------------------- Feature #6012: Proc#source_location also return the column https://bugs.ruby-lang.org/issues/6012#change-115979 * Author: rogerdpack (Roger Pack) * Status: Closed * 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/
participants (1)
-
mame (Yusuke Endoh)