opal 0.8.0.rc2 → 0.8.0.rc3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e61445cf4e1d298823c1de6822ede17c133f10dc
4
- data.tar.gz: dd4f67da6dde06a3f9ca8c82c15ff8f47b1957f9
3
+ metadata.gz: 48b5e00792787aefc0842b3c9447e02b0a700081
4
+ data.tar.gz: 097ece680f61aaca4b7fd4e0b0ec11f3dae434c7
5
5
  SHA512:
6
- metadata.gz: 2788eb5f67b8e7d9c7d18b952ebcc2bd40fa32b7e858330de25b87e8ffbfd2993af6e83396a2c4ab9cbe59c2bac2032e3bafc84f938814e67bc8d84fb9fd5aab
7
- data.tar.gz: 45c31850bda55bb31a838ed42186f354146f98915031fe80d2e0c481a5ca7074a3d66b70049d6173470c3fadfc4bc9cf72051fc6da5c19c525e5eadb671408ed
6
+ metadata.gz: ce94cda65dca8cdbc6991a8bf7e09a51d8fa1b67776f9062f34171c9b9ba7f0f7763d5e540f4e529dff89698cfc8ea548557572062653ce03ced35cea8706a10
7
+ data.tar.gz: e2e4c8a6385f356e9b71bb32a1e8d806d82e5e32db1b15629405eaa9545593b81b95bc04f620bd12f234da369891d9b85534fb0bc9d0aba3e5f18c8d7cd2ad8f
data/.gitignore CHANGED
@@ -9,3 +9,6 @@ build/
9
9
  /node_modules
10
10
  /gh-pages
11
11
  /tmp
12
+ .ruby-gemset
13
+ .ruby-version
14
+ .rvmrc
@@ -1,12 +1,22 @@
1
1
  ## edge (upcoming 0.8.0)
2
2
 
3
+ * Update to Sprockets v3.0.
4
+
5
+ * Delegate dependency management directly to Sprockets (when used) making sourcemaps swift again.
6
+ This means code generated by sprockets will always need to be bootstrapped via `Opal.load` or `Opal.require`.
7
+ Luckily `Opal::Processor.load_asset_code(sprockets, name)` does just that in the right way.
8
+
9
+ * Enable operator inlining by default in the compiler.
10
+
11
+ * Fix `Promise#always`.
12
+
3
13
  * Fix `String#split` when no match is found and a limit is provided
4
14
 
5
15
  * Fix `require_tree(".")` when used from file at the root of the assets paths
6
16
 
7
17
  * `Hash[]` implementation fully compliant with rubyspec
8
18
 
9
- * Removed minitest from stdlib. It's not part of MRI and it never belonged there, checkout the opal-minitest gem instead.
19
+ * Removed `minitest` from stdlib. It's not part of MRI and it never belonged there, checkout the `opal-minitest` gem instead.
10
20
 
11
21
  * Parser: Allow trailing comma in paren arglists, after normal args as
12
22
  well as assoc args.
@@ -17,23 +27,53 @@
17
27
  * Parser: Fix bug where keyword arguments could not be parsed if
18
28
  method definition did not have parens around arguments.
19
29
 
20
- * Support calling `String#[]` and `String#slice` with a regexp argument
21
-
22
- * `String#[]` and `String#slice` implementation fully compliant with rubyspec
23
-
24
- * `Array#product` implementation fully compliant with rubyspec
25
-
26
- * `Module#const_get` accepts a scoped constant name
27
-
28
- * `String#succ` and `String#next` implementation fully compliant with rubyspec
29
-
30
- * `String#===`, `String#==`, and `String#eql?` implementation fully compliant with rubyspec
31
-
32
- * Add support for sprockets 3.0 while keeping compatibility with the 2.0 series
33
-
34
- * Delegate dependency management directly to Sprockets (when used) making sourcemaps swift again.
35
- This means code generated by sprockets will always need to be bootstrapped via `Opal.load` or `Opal.require`.
36
- Luckily `Opal::Processor.load_asset_code(sprockets, name)` does just that in the right way.
30
+ * Newly compliant with RubySpec:
31
+ * `Array#bsearch`
32
+ * `Array#combination`
33
+ * `Array#permutation`
34
+ * `Array#product`
35
+ * `Array#rotate!`
36
+ * `Array#rotate`
37
+ * `Array#sample`
38
+ * `Array#to_h`
39
+ * `Array#values_at`
40
+ * `Array#zip`
41
+ * `Enumerator#with_index`
42
+ * `Kernel#===`
43
+ * `Kernel#Array`
44
+ * `Kernel#Float`
45
+ * `Kernel#Hash`
46
+ * `Kernel#Integer`
47
+ * `Kernel#String`
48
+ * `Kernel#format`
49
+ * `Kernel#sprintf`
50
+ * `MatchData#==`
51
+ * `MatchData#eql?`
52
+ * `MatchData#values_at`
53
+ * `Module#instance_methods`
54
+ * `Regexp#match`
55
+ * `String#%`
56
+ * `String#===`
57
+ * `String#==`
58
+ * `String#[]`
59
+ * `String#each_line`
60
+ * `String#eql?`
61
+ * `String#index`
62
+ * `String#inspect`
63
+ * `String#lines`
64
+ * `String#match`
65
+ * `String#next`
66
+ * `String#oct`
67
+ * `String#scan`
68
+ * `String#slice`
69
+ * `String#split`
70
+ * `String#succ`
71
+ * `String#to_i`
72
+ * `String#try_convert`
73
+
74
+ * Misc corelib fixes:
75
+ * `Module#const_get` accepts a scoped constant name
76
+ * `Regexp#===` sets global match data vars
37
77
 
38
78
  ## 0.7.2 2015-04-23
39
79
 
@@ -84,7 +84,7 @@ module Opal
84
84
  case path_info
85
85
  when %r{^(.*)\.self\.map$}
86
86
  path = $1
87
- asset = sprockets[path]
87
+ asset = sprockets[path+'.js']
88
88
  return not_found(path) if asset.nil?
89
89
 
90
90
  # "logical_name" of a BundledAsset keeps the .js extension
@@ -1,5 +1,5 @@
1
1
  module Opal
2
2
  # WHEN RELEASING:
3
3
  # Remember to update RUBY_ENGINE_VERSION in opal/corelib/variables.rb too!
4
- VERSION = '0.8.0.rc2'
4
+ VERSION = '0.8.0.rc3'
5
5
  end
@@ -539,8 +539,22 @@ class Hash
539
539
 
540
540
  def has_value?(value)
541
541
  %x{
542
- for (var khash in self.map) {
543
- if (#{`self.map[khash]` == value}) {
542
+ var _map = self.map,
543
+ smap = self.smap,
544
+ keys = self.keys, key, map, khash;
545
+
546
+ for (var i = 0, length = keys.length; i < length; i++) {
547
+ key = keys[i];
548
+
549
+ if (key.$$is_string) {
550
+ map = smap;
551
+ khash = key;
552
+ } else {
553
+ map = _map;
554
+ khash = key.$hash();
555
+ }
556
+
557
+ if (#{`map[khash]` == value}) {
544
558
  return true;
545
559
  }
546
560
  }
@@ -20,5 +20,5 @@ $SAFE = 0
20
20
  RUBY_PLATFORM = 'opal'
21
21
  RUBY_ENGINE = 'opal'
22
22
  RUBY_VERSION = '2.1.5'
23
- RUBY_ENGINE_VERSION = '0.8.0.rc2'
24
- RUBY_RELEASE_DATE = '2015-07-04'
23
+ RUBY_ENGINE_VERSION = '0.8.0.rc3'
24
+ RUBY_RELEASE_DATE = '2015-07-13'
@@ -0,0 +1,13 @@
1
+ describe 'Hash#has_value?' do
2
+ context 'when hash contains provided value' do
3
+ it 'returns true' do
4
+ expect({ a: 1 }.has_value?(1)).to eq(true)
5
+ end
6
+ end
7
+
8
+ context 'when hash does not contain provided value' do
9
+ it 'returns false' do
10
+ expect({ a: 1 }.has_value?(2)).to eq(false)
11
+ end
12
+ end
13
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0.rc2
4
+ version: 0.8.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Beynon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-04 00:00:00.000000000 Z
11
+ date: 2015-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sourcemap
@@ -485,6 +485,7 @@ files:
485
485
  - spec/opal/core/fixtures/require_tree_files/nested/nested 1.rb
486
486
  - spec/opal/core/fixtures/require_tree_files/nested/nested 2.rb
487
487
  - spec/opal/core/fixtures/require_tree_files/other/other 1.rb
488
+ - spec/opal/core/hash/has_value_spec.rb
488
489
  - spec/opal/core/kernel/Array_spec.rb
489
490
  - spec/opal/core/kernel/block_given_spec.rb
490
491
  - spec/opal/core/kernel/class_spec.rb
@@ -1081,6 +1082,7 @@ test_files:
1081
1082
  - spec/opal/core/fixtures/require_tree_files/nested/nested 1.rb
1082
1083
  - spec/opal/core/fixtures/require_tree_files/nested/nested 2.rb
1083
1084
  - spec/opal/core/fixtures/require_tree_files/other/other 1.rb
1085
+ - spec/opal/core/hash/has_value_spec.rb
1084
1086
  - spec/opal/core/kernel/Array_spec.rb
1085
1087
  - spec/opal/core/kernel/block_given_spec.rb
1086
1088
  - spec/opal/core/kernel/class_spec.rb