From: SASADA Koichi Date: 2012-11-29T04:43:02+09:00 Subject: [ruby-core:50265] Re: [ruby-trunk - Feature #7051][Open] Extend caller_locations API to include klass and bindings. Allow caller_locations as a method hanging off Thread. (2012/11/27 9:02), SASADA Koichi wrote: > (2012/09/23 15:43), sam.saffron (Sam Saffron) wrote: >> Also it feels very tied to MRI returning RubyVM:::Backtrace::Location , Location seems to me in the wrong namespace. Is JRuby and Rubinius going to be expected to add this namespace? Is this going to be spec? > > I want to discuss about this issue. > I agree that it is not CRuby specific feature > and RubyVM namespace is not good. > > Background: > > (0) Now, caller_locations returns array of > ::RubyVM::Backtrace::Location objects. > > (1) I don't care about class name of objects > what caller_locations returns. > > (2) ::Backtrace::Location seems good name. > But I'm not sure that ::Backtrace is common class or module name. > I'm afraid naming conflict. > > Ideas: > > (a) Don't care about conflict. > Rename to ::Backtrace::Location. > > (b) Don't touch any more. > CRuby returns `::RubyVM::Backtrace::Location'. > But make it not spec. > Spec is "This object should respond to several > methods which ::RubyVM::Backtrace::Location has". > > (c) Other names. > Such as `::BacktraceLocation'. > Ah, this is good name because it is long > and maybe no conflict with existing code (I googled it), isn't it? > > I think (c) seems good now. (d) ::Thread::Backtrace and ::Thread::Backtrace::Location I decided to use this name. * Backtrace belong to each threads. * More common than ::RubyVM * I believe existing programs may not use ::Thread namespace -- // SASADA Koichi at atdot dot net