[#69616] [Ruby trunk - Feature #11258] add 'x' mode character for O_EXCL — cremno@...
Issue #11258 has been updated by cremno phobia.
3 messages
2015/06/16
[#69643] [Ruby trunk - Misc #11276] [RFC] compile.c: convert to use ccan/list — normalperson@...
Issue #11276 has been updated by Eric Wong.
3 messages
2015/06/17
[#69751] [Ruby trunk - Bug #11001] 2.2.1 Segmentation fault in reserve_stack() function. — kubo@...
Issue #11001 has been updated by Takehiro Kubo.
3 messages
2015/06/27
[ruby-core:69546] [Ruby trunk - Feature #11087] [Feedback] Method to retrieve {local, global, instance} variables as a Hash
From:
ko1@...
Date:
2015-06-12 09:13:19 UTC
List:
ruby-core #69546
Issue #11087 has been updated by Koichi Sasada.
Status changed from Open to Feedback
----------------------------------------
Feature #11087: Method to retrieve {local,global,instance} variables as a Hash
https://bugs.ruby-lang.org/issues/11087#change-52877
* Author: Godfrey Chan
* Status: Feedback
* Priority: Normal
* Assignee: Yukihiro Matsumoto
----------------------------------------
Rails implemented [Object#instance_values](http://api.rubyonrails.org/classes/Object.html#method-i-instance_values) which returns all the instance variables as a hash.
This is used for [serialization](https://github.com/rails/rails/blob/7c7d9dcf5a966a5490fe99230ab9513d73df9630/activesupport/lib/active_support/core_ext/object/json.rb#L52), but it is pretty useful for introspection, debugging and reporting as well. (For example, it could be used to implement [something like this](https://github.com/rails/web-console/issues/121#issuecomment-89956638).)
I was going to propose an equivalent for local variables (and I suppose global variables too, for completeness), but if there are interest maybe we can do this on Ruby instead.
There are also some open questions:
* Naming
* Hash or iterator? (like Rails' `Object#instance_value` or like `ObjectSpace.each_object`)
* Rails' `Object#instance_values` removes the leading `@`, are we going to do the same? (Probably not?)
--
https://bugs.ruby-lang.org/