Merge pull request #563 from Shopify/webscale_exceptions

Prefer Class.new() where possible
This commit is contained in:
Florian Weingarten
2015-05-13 06:06:35 +02:00
2 changed files with 9 additions and 10 deletions
+8 -8
View File
@@ -49,12 +49,12 @@ module Liquid
end end
end end
class ArgumentError < Error; end ArgumentError = Class.new(Error)
class ContextError < Error; end ContextError = Class.new(Error)
class FileSystemError < Error; end FileSystemError = Class.new(Error)
class StandardError < Error; end StandardError = Class.new(Error)
class SyntaxError < Error; end SyntaxError = Class.new(Error)
class StackLevelError < Error; end StackLevelError = Class.new(Error)
class TaintedError < Error; end TaintedError = Class.new(Error)
class MemoryError < Error; end MemoryError = Class.new(Error)
end end
+1 -2
View File
@@ -4,8 +4,7 @@ module Liquid
class I18n class I18n
DEFAULT_LOCALE = File.join(File.expand_path(File.dirname(__FILE__)), "locales", "en.yml") DEFAULT_LOCALE = File.join(File.expand_path(File.dirname(__FILE__)), "locales", "en.yml")
class TranslationError < StandardError TranslationError = Class.new(StandardError)
end
attr_reader :path attr_reader :path