Fix for Ruby 2.2.0

The error message about frozen object seems to be updated in Ruby 2.2.

For example, the following code throws an error that has different error message with Ruby version:
``` ruby
"".freeze.instance_eval do
  def hi
  end
end
```

In Ruby 2.1.3:
> RuntimeError: can't modify frozen Class

In Ruby 2.2.0-preview1:
> RuntimeError: can't modify frozen object

This PR handle error about frozen object in Ruby 2.2