Update mining.rb

fixed a minor bug
Merge pull request #6 from hikilaka/patch-2

Update mining.rb