Update mining.rb

fixed a minor bug