Guest User

Untitled

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