diff options
author | Eric Wong <e@80x24.org> | 2016-12-29 07:39:48 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-12-29 07:39:48 +0000 |
commit | d32775bded58382bcfb9196829eb356eed267e08 (patch) | |
tree | e35c09e91204a4bd02855dd25fd2a984052e8756 /lib/mogilefs/new_file/common.rb | |
parent | 8307157e7381f24b2833d3e3fdf084555265f420 (diff) | |
download | mogilefs-client-d32775bded58382bcfb9196829eb356eed267e08.tar.gz |
This compiles to smaller bytecode on YARV (MRI)
Diffstat (limited to 'lib/mogilefs/new_file/common.rb')
-rw-r--r-- | lib/mogilefs/new_file/common.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/mogilefs/new_file/common.rb b/lib/mogilefs/new_file/common.rb index 44eee69..d696072 100644 --- a/lib/mogilefs/new_file/common.rb +++ b/lib/mogilefs/new_file/common.rb @@ -7,14 +7,14 @@ require 'mogilefs/chunker' module MogileFS::NewFile::Common # :stopdoc: - class RetryableError < MogileFS::Error; end - class EmptyResponseError < RetryableError; end - class BadResponseError < RetryableError; end - class UnparseableResponseError < RetryableError; end + RetryableError = Class.new(MogileFS::Error) + EmptyResponseError = Class.new(RetryableError) + BadResponseError = Class.new(RetryableError) + UnparseableResponseError = Class.new(RetryableError) class NoStorageNodesError < MogileFS::Error def message; 'Unable to open socket to storage node'; end end - class NonRetryableError < MogileFS::Error; end + NonRetryableError = Class.new(MogileFS::Error) MD5_TRAILER_NODES = {} # :nodoc: # EXPERIMENTAL |