Currently this RuntimeError is caught by following rescue and it raises wrapped TypeError with description.
I agree simply twice code is more readable at here. But it looks not-DRY a bit. Hmm...

```ruby
  def FloatValue(obj)
    raise TypeError, 'no implicit conversion to float' if obj.kind_of?(String)

    begin
      Float(obj)
    rescue
      raise TypeError, 'no implicit conversion to float'
    end
  end
```