Skip to content

Commit

Permalink
Fixed ENABLE_NIL_PARSER assignment for Ruby 1.9.2+ using const_set
Browse files Browse the repository at this point in the history
  • Loading branch information
jawj committed Dec 18, 2011
1 parent a2ebf83 commit 6748781
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ruby-client/pyapns/lib/pyapns.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6748781

Please sign in to comment.