Skip to content

Commit

Permalink
Showing 2 changed files with 11 additions and 13 deletions.
13 changes: 0 additions & 13 deletions spec/truffle/tags/core/kernel/Hash_tags.txt

This file was deleted.

11 changes: 11 additions & 0 deletions truffle/src/main/ruby/core/rubinius/common/kernel.rb
Original file line number Diff line number Diff line change
@@ -88,6 +88,17 @@ def FloatValue(obj)
end
private :FloatValue

def Hash(obj)
return {} if obj.nil? || obj == []

if hash = Rubinius::Type.check_convert_type(obj, Hash, :to_hash)
return hash
end

raise TypeError, "can't convert #{obj.class} into Hash"
end
module_function :Hash

def Integer(obj, base=nil)
if obj.kind_of? String
if obj.empty?

0 comments on commit e3f06c5

Please sign in to comment.