<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/syntax_suggest/api.rb, branch v4.0.3</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/syntax_suggest] bundle exec standardrb --fix</title>
<updated>2025-08-19T01:48:32+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-08-19T01:43:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f5efd0e74340704d546c265d9e01bc9f85dbec0c'/>
<id>f5efd0e74340704d546c265d9e01bc9f85dbec0c</id>
<content type='text'>
https://github.com/ruby/syntax_suggest/commit/54bb8ab330
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/syntax_suggest/commit/54bb8ab330
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/syntax_suggest] Fix missing line break due to puts logic</title>
<updated>2024-11-15T01:31:26+00:00</updated>
<author>
<name>Schneems</name>
<email>richard.schneeman+foo@gmail.com</email>
</author>
<published>2024-11-15T00:54:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=226cfda3069c76c094d294a68585b5772fcc730a'/>
<id>226cfda3069c76c094d294a68585b5772fcc730a</id>
<content type='text'>
In #225 it was reported that the output looks incorrect:

```
$ cat /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
def x.y.z
end
$ ruby /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
/tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb: --&gt; /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
expected a delimiter to close the parametersunexpected '.', ignoring it
&gt; 1  def x.y.z
&gt; 2  end
```

Specifically:

```
expected a delimiter to close the parametersunexpected '.', ignoring it
```

However this does not show up when executing the debug executable:

```
$ bin/bundle exec exe/syntax_suggest /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
--&gt; /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb

expected a delimiter to close the parameters
unexpected '.', ignoring it

&gt; 1  def x.y.z
&gt; 2  end
```

This is because `exe/syntax_suggest` uses STDOUT.puts while calling `ruby` with the filename uses a fake IO object represented by MiniStringIO. This class was incorrectly not adding a newline to the end of the print.

The fix was to move the class to it's own file where it can be tested and then fix the behavior.

close https://github.com/ruby/syntax_suggest/pull/225

https://github.com/ruby/syntax_suggest/commit/d2ecd94a3b

Co-authored-by: Andy Yong &lt;andyywz@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In #225 it was reported that the output looks incorrect:

```
$ cat /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
def x.y.z
end
$ ruby /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
/tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb: --&gt; /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
expected a delimiter to close the parametersunexpected '.', ignoring it
&gt; 1  def x.y.z
&gt; 2  end
```

Specifically:

```
expected a delimiter to close the parametersunexpected '.', ignoring it
```

However this does not show up when executing the debug executable:

```
$ bin/bundle exec exe/syntax_suggest /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
--&gt; /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb

expected a delimiter to close the parameters
unexpected '.', ignoring it

&gt; 1  def x.y.z
&gt; 2  end
```

This is because `exe/syntax_suggest` uses STDOUT.puts while calling `ruby` with the filename uses a fake IO object represented by MiniStringIO. This class was incorrectly not adding a newline to the end of the print.

The fix was to move the class to it's own file where it can be tested and then fix the behavior.

close https://github.com/ruby/syntax_suggest/pull/225

https://github.com/ruby/syntax_suggest/commit/d2ecd94a3b

Co-authored-by: Andy Yong &lt;andyywz@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/syntax_suggest] Update docs, clean up PR</title>
<updated>2023-12-05T17:51:29+00:00</updated>
<author>
<name>Schneems</name>
<email>richard.schneeman+foo@gmail.com</email>
</author>
<published>2023-12-04T22:59:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6d39d6d2143f7b910f310de0ff92772839ac72a2'/>
<id>6d39d6d2143f7b910f310de0ff92772839ac72a2</id>
<content type='text'>
Removes or updates mentions of Ripper

https://github.com/ruby/syntax_suggest/commit/08aaa3f50a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removes or updates mentions of Ripper

https://github.com/ruby/syntax_suggest/commit/08aaa3f50a
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/syntax_suggest] Support lexing with Prism</title>
<updated>2023-12-05T17:51:28+00:00</updated>
<author>
<name>Schneems</name>
<email>richard.schneeman+foo@gmail.com</email>
</author>
<published>2023-12-04T21:23:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=62c96959114ea165f7434da9edc42d15e4aaebfa'/>
<id>62c96959114ea165f7434da9edc42d15e4aaebfa</id>
<content type='text'>
https://github.com/ruby/syntax_suggest/commit/7f4176a914
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/syntax_suggest/commit/7f4176a914
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/syntax_suggest] Initial support for the prism parser</title>
<updated>2023-12-05T17:51:27+00:00</updated>
<author>
<name>Schneems</name>
<email>richard.schneeman+foo@gmail.com</email>
</author>
<published>2023-12-01T18:14:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cce29750d797a85ac89540b9ad47816131652a2f'/>
<id>cce29750d797a85ac89540b9ad47816131652a2f</id>
<content type='text'>
Prism will be the parser in Ruby 3.3. We need to support 3.0+ so we will have to "dual boot" both parsers.

Todo:

- LexAll to support Prism lex output
- Add tests that exercise both Ripper and prism codepaths on CI
- Handle https://github.com/ruby/prism/issues/1972 in `ripper_errors.rb`
- Update docs to not mention Ripper explicitly
- Consider different/cleaner APIs for separating out Ripper and Prism

https://github.com/ruby/syntax_suggest/commit/a7d6991cc4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prism will be the parser in Ruby 3.3. We need to support 3.0+ so we will have to "dual boot" both parsers.

Todo:

- LexAll to support Prism lex output
- Add tests that exercise both Ripper and prism codepaths on CI
- Handle https://github.com/ruby/prism/issues/1972 in `ripper_errors.rb`
- Update docs to not mention Ripper explicitly
- Consider different/cleaner APIs for separating out Ripper and Prism

https://github.com/ruby/syntax_suggest/commit/a7d6991cc4
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/syntax_suggest] Fix warning message</title>
<updated>2023-05-23T01:05:47+00:00</updated>
<author>
<name>schneems</name>
<email>richard.schneeman+foo@gmail.com</email>
</author>
<published>2023-05-03T18:48:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b8bf0a52723322e469e94a4cb96286fd48e754ab'/>
<id>b8bf0a52723322e469e94a4cb96286fd48e754ab</id>
<content type='text'>
The env var DEBUG does not work to produce detailed output. It is SYNTAX_SUGGEST_DEBUG. It was changed as part of the dead_end to syntax_suggest migration for Ruby 3.2

https://github.com/ruby/syntax_suggest/commit/c41da7aab7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The env var DEBUG does not work to produce detailed output. It is SYNTAX_SUGGEST_DEBUG. It was changed as part of the dead_end to syntax_suggest migration for Ruby 3.2

https://github.com/ruby/syntax_suggest/commit/c41da7aab7
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/syntax_suggest] Handle alias already exists when debugging</title>
<updated>2023-04-06T06:45:27+00:00</updated>
<author>
<name>schneems</name>
<email>richard.schneeman+foo@gmail.com</email>
</author>
<published>2023-03-07T23:49:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=33cfd262fcfe65737b6d4cde416a24cd81406885'/>
<id>33cfd262fcfe65737b6d4cde416a24cd81406885</id>
<content type='text'>
When `tmp/alias` already exists, I'm now getting phantom folders in the directory pointing at older aliases which is distracting/confusing. By checking and removing that alias before symlinking we can prevent this strange behavior (possibly caused by newer Mac OS?).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When `tmp/alias` already exists, I'm now getting phantom folders in the directory pointing at older aliases which is distracting/confusing. By checking and removing that alias before symlinking we can prevent this strange behavior (possibly caused by newer Mac OS?).
</pre>
</div>
</content>
</entry>
<entry>
<title>Sync SyntaxSuggest</title>
<updated>2022-08-19T01:02:24+00:00</updated>
<author>
<name>schneems</name>
<email>richard.schneeman+foo@gmail.com</email>
</author>
<published>2022-07-26T20:21:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=490af8dbdb66263f29d0b4e43752fbb298b94862'/>
<id>490af8dbdb66263f29d0b4e43752fbb298b94862</id>
<content type='text'>
```
$ tool/sync_default_gems.rb syntax_suggest
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
```
$ tool/sync_default_gems.rb syntax_suggest
```
</pre>
</div>
</content>
</entry>
</feed>
