Use encode helper

https://github.com/rubyspec/rubyspec/commit/c668b143c449df11266797c1249c90cd4d965404#commitcomment-2818462
guard 1.8 behavior
1.8's sprintf is wrappr of sprintf(3)

glib's sprintf(3) behaves differently from FreeBSD's.
Add ruby_bu guard
1.8's Matrix returns Matrix
Add 1.8.7's bahavior
Remvoe because simple platfomr dependent spec is added
Hash order is not consistent on 1.8