adapt bitcoin-ruby/pull/2, thanks pascalbetz
adapt bitcoin-ruby/pull/2, thanks pascalbetz

xiumiao/bitcoin-ruby,Zlerp/bitcoin-ruby,assafshomer/bitcoin-ruby,robertg/bitcoin-ruby,georgemillo/bitcoin-ruby,mhanne/bitcoin-ruby,bitpesa/bitcoin-ruby,tarix/bitcoin-ruby