Skip to content

Conversation

@DavidS
Copy link
Contributor

@DavidS DavidS commented Jun 11, 2020

No description provided.

DavidS added 3 commits June 11, 2020 23:23
* Reformat YAML
* address build config validation warnings
  * remove outdated config options
  * specify modern build environment
Ruby 2.7's AST has added an entry for `:period` between the function
call and the const reference. This change makes it so the method1_name parsing can deal with that.

Ruby 2.5:
```
[1] pry(#<PuppetStrings::Yard::Handlers::Ruby::TypeExtrasHandler>)> statement[0].children
=> [s(:const_path_ref,
    s(:var_ref, s(:const, "Puppet", line: 1..1, source: 2..7), line: 1..1, source: 2..7),
    s(:const, "Type", line: 1..1, source: 10..13),
    line: 1..1,
    source: 2..13),
 s(:ident, "type", line: 1..1, source: 15..18),
 s(:arg_paren,
    s(s(:symbol_literal, s(:symbol, s(:ident, "file", line: 1..1, source: 21..24), line: 1..1, source: 20..24), line: 1..1, source: 20..24), false),
    line: 1..1,
    source: 19..25)]
[2] pry(#<PuppetStrings::Yard::Handlers::Ruby::TypeExtrasHandler>)>
```

Ruby 2.7:
```
[4] pry(#<PuppetStrings::Yard::Handlers::Ruby::TypeExtrasHandler>)> statement[0].children
=> [s(:const_path_ref,
    s(:var_ref, s(:const, "Puppet", line: 1..1, source: 2..7), line: 1..1, source: 2..7),
    s(:const, "Type", line: 1..1, source: 10..13),
    line: 1..1,
    source: 2..13),
 s(:period, ".", line: 1..1, source: 14..14),
 s(:ident, "type", line: 1..1, source: 15..18),
 s(:arg_paren,
    s(s(:symbol_literal, s(:symbol, s(:ident, "file", line: 1..1, source: 21..24), line: 1..1, source: 20..24), line: 1..1, source: 20..24), false),
    line: 1..1,
    source: 19..25)]
[5] pry(#<PuppetStrings::Yard::Handlers::Ruby::TypeExtrasHandler>)>
```
@sanfrancrisko sanfrancrisko merged commit 8941b63 into puppetlabs:master Jun 15, 2020
@DavidS DavidS deleted the ruby27 branch June 22, 2020 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants