aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-06-08 08:43:27 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-06-08 08:45:04 +0900
commitd93317534ca6350ae9f8a9f285250e5b63728ba3 (patch)
tree7dacb42257b435f44ddb761d477c26288f47fc26
parentac8b79d553592b3c9515940b5fe5e9d3c7ec9a45 (diff)
downloadrails-d93317534ca6350ae9f8a9f285250e5b63728ba3.tar.gz
rails-d93317534ca6350ae9f8a9f285250e5b63728ba3.tar.bz2
rails-d93317534ca6350ae9f8a9f285250e5b63728ba3.zip
Remove unreachable code
`Time.find_zone!` raise `ArgumentError` if invalid value is specified. https://github.com/rails/rails/blob/379a0b42daf0d8e14130db7fd886d05d8d88e3f2/activesupport/lib/active_support/core_ext/time/zones.rb#L97..L99 Therefore, the return value never becomes nil.
-rw-r--r--activesupport/lib/active_support/railtie.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb
index 1b4ecf4d72..af1d5bd615 100644
--- a/activesupport/lib/active_support/railtie.rb
+++ b/activesupport/lib/active_support/railtie.rb
@@ -28,14 +28,7 @@ module ActiveSupport
raise e.exception "tzinfo-data is not present. Please add gem 'tzinfo-data' to your Gemfile and run bundle install"
end
require "active_support/core_ext/time/zones"
- zone_default = Time.find_zone!(app.config.time_zone)
-
- unless zone_default
- raise "Value assigned to config.time_zone not recognized. " \
- 'Run "rake time:zones:all" for a time zone names list.'
- end
-
- Time.zone_default = zone_default
+ Time.zone_default = Time.find_zone!(app.config.time_zone)
end
# Sets the default week start