Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 5bc65d32a18c565aa6bf3598954e33c72a1816a0 Mon Sep 17 00:00:00 2001
- From: Evan Phoenix <ephoenix@engineyard.com>
- Date: Tue, 26 Oct 2010 12:07:09 -0200
- Subject: [PATCH] Only consider constants that start with E
- ---
- lib/memcached/exceptions.rb | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
- diff --git a/lib/memcached/exceptions.rb b/lib/memcached/exceptions.rb
- index e90f721..f42d91a 100644
- --- a/lib/memcached/exceptions.rb
- +++ b/lib/memcached/exceptions.rb
- @@ -67,7 +67,7 @@ Subclasses correspond one-to-one with server response strings or libmemcached er
- end
- end
- - ERRNO_HASH = Hash[*Errno.constants.map{ |c| [Errno.const_get(c)::Errno, Errno.const_get(c).new.message] }.flatten]
- + ERRNO_HASH = Hash[*Errno.constants.grep(/^E/).map{ |c| [Errno.const_get(c)::Errno, Errno.const_get(c).new.message] }.flatten]
- EXCEPTIONS = []
- EMPTY_STRUCT = Rlibmemcached::MemcachedSt.new
- --
- 1.7.1.94.g636e8.dirty
Add Comment
Please, Sign In to add comment