Prefer Class.new() where possible

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