Skip to content

Commit 794a7fb

Browse files
committed
skip spec if on old version of parser
1 parent 2051598 commit 794a7fb

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

docs/development-workflow/hyper-spec/03-methods-and-features.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,9 @@ page.instance_variable_set("@hyper_spec_mounted", true)
454454
Upvote issue 398 if this presents a big problem for you.
455455

456456
#### Some Complex Expressions Do Not Work
457+
> This has been fixed in Parser version 2.7 which works with Opal 1.0
458+
> So the issue is only with older versions of Opal.
459+
457460
[Issue 127](https://github.com/hyperstack-org/hyperstack/issues/127)
458461

459462
You may get an error like this when running a spec:

release-notes/1.0.alpha1.7.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@
2323

2424
### Not Reproducible
2525
+ [#47](https://github.com/hyperstack-org/hyperstack/issues/47) Added spec - passing a proc for children works fine.
26+
+ [#108](https://github.com/hyperstack-org/hyperstack/issues/108) Can't repeat - possibly STI class != STI type field while data is loading
2627

2728
### Deprecated

ruby/hyper-spec/hyper-spec.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
3131
# spec.add_dependency 'libv8', '~> 7.3.492.27.1'
3232
spec.add_dependency 'method_source'
3333
spec.add_dependency 'opal', ENV['OPAL_VERSION'] || '>= 0.11.0', '< 2.0'
34-
spec.add_dependency 'parser', '>= 3.0' #'>= 2.3.3.1' # on rails-6 this is now >= 2.3
34+
spec.add_dependency 'parser'#, '~> 2.7' #, '~> 2.3.3.1' # on rails-6 this is now >= 2.3
3535
spec.add_dependency 'rspec'
3636
spec.add_dependency 'selenium-webdriver'
3737
spec.add_dependency 'timecop', '~> 0.8.1'

ruby/hyper-spec/lib/hyper-spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@
4040
# opt-in to most recent AST format:
4141
Parser::Builders::Default.emit_lambda = true
4242
Parser::Builders::Default.emit_procarg0 = true
43-
Parser::Builders::Default.emit_encoding = true
44-
Parser::Builders::Default.emit_index = true
45-
Parser::Builders::Default.emit_arg_inside_procarg0 = true
46-
Parser::Builders::Default.emit_forward_arg = true
47-
Parser::Builders::Default.emit_kwargs = true
48-
Parser::Builders::Default.emit_match_pattern = true
43+
(Parser::Builders::Default.emit_encoding = true) rescue nil
44+
(Parser::Builders::Default.emit_index = true) rescue nil
45+
(Parser::Builders::Default.emit_arg_inside_procarg0 = true) rescue nil
46+
(Parser::Builders::Default.emit_forward_arg = true) rescue nil
47+
(Parser::Builders::Default.emit_kwargs = true) rescue nil
48+
(Parser::Builders::Default.emit_match_pattern = true) rescue nil
4949

5050
# not available in parser 2.3
5151
if Parser::Builders::Default.respond_to? :emit_arg_inside_procarg0

ruby/hyper-spec/spec/hyper_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ class << self
463463
expect { with_var * 2 }.with(with_var: 4).on_client_to eq(8)
464464
end
465465

466-
it "works with complex expressions" do
466+
it "works with complex expressions", skip: (Parser::VERSION < "2.7.2.0" ) && "Incompatible with Parser #{Parser::VERSION}" do
467467
expect do
468468
hash = { 'foo' => 1}
469469
hash['foo'] += 1

0 commit comments

Comments
 (0)