aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/base.rb
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2011-04-13 00:04:40 +0800
committerDavid Heinemeier Hansson <david@loudthinking.com>2011-04-13 20:25:28 +0800
commit733bfa63f5d8d3b963202b6d3e9f00b4db070b91 (patch)
tree10febe66946c850ce8e6bc0c9560d55d83b7a608 /railties/lib/rails/generators/base.rb
parent1f869114f5f671160653eb6f15d2850d82217fe5 (diff)
downloadrails-733bfa63f5d8d3b963202b6d3e9f00b4db070b91.tar.gz
rails-733bfa63f5d8d3b963202b6d3e9f00b4db070b91.tar.bz2
rails-733bfa63f5d8d3b963202b6d3e9f00b4db070b91.zip
Remove `#among?` from Active Support
After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now. It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
Diffstat (limited to 'railties/lib/rails/generators/base.rb')
-rw-r--r--railties/lib/rails/generators/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/base.rb b/railties/lib/rails/generators/base.rb
index 2b0eaea3a4..8d03cb911b 100644
--- a/railties/lib/rails/generators/base.rb
+++ b/railties/lib/rails/generators/base.rb
@@ -165,7 +165,7 @@ module Rails
names.each do |name|
defaults = if options[:type] == :boolean
{ }
- elsif default_value_for_option(name, options).among?(true, false)
+ elsif default_value_for_option(name, options).in?([true, false])
{ :banner => "" }
else
{ :desc => "#{name.to_s.humanize} to be invoked", :banner => "NAME" }