Skip to content

Commit 2e142d9

Browse files
author
David Heinemeier Hansson
committed
Explain the optimization setup
1 parent 0239401 commit 2e142d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

activesupport/lib/active_support/environment_inquirer.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
module ActiveSupport
66
class EnvironmentInquirer < StringInquirer # :nodoc:
7-
DEFAULT_ENVIRONMENTS = ["development", "test", "production"]
7+
# Optimization for the three default environments, so this inquirer doesn't need to rely on
8+
# the slower delegation through method_missing that StringInquirer would normally entail.
9+
DEFAULT_ENVIRONMENTS = %w[ development test production ]
810
def initialize(env)
911
super(env)
1012

0 commit comments

Comments
 (0)