Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1b1ad8d83683
Choose a base ref
...
head repository: opal/opal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9b407e69f2b3
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Oct 31, 2014

  1. Copy the full SHA
    ce18182 View commit details
  2. Copy the full SHA
    9b407e6 View commit details
Showing with 5 additions and 3 deletions.
  1. +1 −1 opal.gemspec
  2. +4 −0 opal/corelib/hash.rb
  3. +0 −2 spec/filters/bugs/hash.rb
2 changes: 1 addition & 1 deletion opal.gemspec
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
required_ruby_version = '>= 1.9.3'

s.add_dependency 'sourcemap', '~> 0.1.0'
s.add_dependency 'sprockets', '>= 2.2.1', '< 4.0.0'
s.add_dependency 'sprockets', '>= 2.2.3', '< 4.0.0'
s.add_dependency 'hike', '~> 1.2'
s.add_dependency 'tilt', '~> 1.4'

4 changes: 4 additions & 0 deletions opal/corelib/hash.rb
Original file line number Diff line number Diff line change
@@ -695,6 +695,10 @@ def to_a

def to_h
%x{
if (self.$$class === Opal.Hash) {
return self
}
var hash = new Opal.Hash.$$alloc,
cloned = #{clone};
2 changes: 0 additions & 2 deletions spec/filters/bugs/hash.rb
Original file line number Diff line number Diff line change
@@ -99,8 +99,6 @@
fails "Hash#sort works when some of the keys are themselves arrays"
fails "Hash#sort uses block to sort array if passed a block"

fails "Hash#to_h returns self for Hash instances"

fails "Hash.try_convert does not rescue exceptions raised by #to_hash"
fails "Hash.try_convert sends #to_hash to the argument and raises TypeError if it's not a kind of Hash"
fails "Hash.try_convert sends #to_hash to the argument and returns the result if it's a kind of Hash"