Skip to content

Commit 0988005

Browse files
committedOct 23, 2014
Normalize Numeric#hash and String#hash
1 parent 7bacd7e commit 0988005

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎opal/corelib/numeric.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def gcdlcm(other)
312312
end
313313

314314
def hash
315-
`'Numeric'+self.toString()`
315+
`'Numeric:'+self.toString()`
316316
end
317317

318318
def integer?

‎opal/corelib/string.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def gsub(pattern, replace = undefined, &block)
319319
end
320320

321321
def hash
322-
`self.toString()`
322+
`'String:'+self.toString()`
323323
end
324324

325325
def hex

0 commit comments

Comments
 (0)