Created
September 26, 2019 06:51
-
-
Save ProfAvery/f521c53e66586338bac53cf9fe1e6974 to your computer and use it in GitHub Desktop.
Allow nil to be passed to and from Ruby XML-RPC servers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'xmlrpc/server' | |
def suppress_warnings | |
previous_VERBOSE, $VERBOSE = $VERBOSE, nil | |
yield | |
$VERBOSE = previous_VERBOSE | |
end | |
suppress_warnings do | |
XMLRPC::Config::ENABLE_NIL_PARSER = true | |
XMLRPC::Config::ENABLE_NIL_CREATE = true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment