MRI: some minor optimizations

Just some random tiny issues I found while reading the code. I probably should've put an explanation for each one of them in the commit message but (I forgot it and) I think the changes are straight forward (if you have some basic CRuby knowledge).