class.c: do not freeze meta-meta-class

* class.c (rb_freeze_singleton_class): should not propagate to
  meta-meta-class, and so on, which is shared with the original
  class.  fix occational exceptions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
error.c: preserve encoding

* error.c (rb_error_frozen_object): preserve encoding of class
  name in error message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_math.rb: use Float#infinite?

* test/ruby/test_math.rb (TestMath#assert_infinity): Float#finite?
  returns true also for NaN, so use Float#infinite? instead.
  [ruby-core:65117] [Feature #10261]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e