aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2013-01-04 14:54:58 +0900
committerAkira Matsuda <ronnie@dio.jp>2013-01-04 14:54:58 +0900
commit257348405a9c9bfb9ea656bd12a2d0db5cb857ee (patch)
treeee03c12e3ac9aaf74fd26f6c288605fc75a15a70 /guides/source
parentffaad630e2166cd77ff4761f1e3d1b555beb9ee5 (diff)
downloadrails-257348405a9c9bfb9ea656bd12a2d0db5cb857ee.tar.gz
rails-257348405a9c9bfb9ea656bd12a2d0db5cb857ee.tar.bz2
rails-257348405a9c9bfb9ea656bd12a2d0db5cb857ee.zip
Ruby 1.8 support had gone
instance_variable_names remains for internal use, but it's not that useful for the users anymore
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/active_support_core_extensions.md18
1 files changed, 0 insertions, 18 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md
index 23736020ec..b0c3400ea8 100644
--- a/guides/source/active_support_core_extensions.md
+++ b/guides/source/active_support_core_extensions.md
@@ -422,24 +422,6 @@ NOTE: Defined in `active_support/core_ext/object/with_options.rb`.
Active Support provides several methods to ease access to instance variables.
-#### `instance_variable_names`
-
-Ruby 1.8 and 1.9 have a method called `instance_variables` that returns the names of the defined instance variables. But they behave differently, in 1.8 it returns strings whereas in 1.9 it returns symbols. Active Support defines `instance_variable_names` as a portable way to obtain them as strings:
-
-```ruby
-class C
- def initialize(x, y)
- @x, @y = x, y
- end
-end
-
-C.new(0, 1).instance_variable_names # => ["@y", "@x"]
-```
-
-WARNING: The order in which the names are returned is unspecified, and it indeed depends on the version of the interpreter.
-
-NOTE: Defined in `active_support/core_ext/object/instance_variables.rb`.
-
#### `instance_values`
The method `instance_values` returns a hash that maps instance variable names without "@" to their