Permalink
Browse files

Fixed ENABLE_NIL_PARSER assignment for Ruby 1.9.2+ using const_set

  • Loading branch information...
1 parent a2ebf83 commit 6748781d9d742aa791af6c1c1fb63b188686c1b7 @jawj jawj committed Dec 18, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 ruby-client/pyapns/lib/pyapns.rb
@@ -5,8 +5,8 @@
require 'xmlrpc/client'
XMLRPC::Config.module_eval {
- remove_const(:ENABLE_NIL_PARSER) # so that we're not warned about reassigning to a constant
- ENABLE_NIL_PARSER = true # so that we don't get "RuntimeError: wrong/unknown XML-RPC type 'nil'"
+ remove_const(:ENABLE_NIL_PARSER) # so that we're not warned about reassigning to a constant
+ const_set(:ENABLE_NIL_PARSER, true) # so that we don't get "RuntimeError: wrong/unknown XML-RPC type 'nil'"
}
module PYAPNS

0 comments on commit 6748781

Please sign in to comment.