<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/spec/syntax_suggest/unit, branch v3_3_11</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] Fix missing line break due to puts logic</title>
<updated>2026-03-23T02:00:31+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=a0fd8328b7bd16abd8d41c01334f26d646353e14'/>
<id>a0fd8328b7bd16abd8d41c01334f26d646353e14</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>Merge syntax-suggest-2.0.1</title>
<updated>2024-10-21T15:41:50+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-10-18T02:12:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c4b6ce36758fbc8d851b8b6563d0cf64cf2417db'/>
<id>c4b6ce36758fbc8d851b8b6563d0cf64cf2417db</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/syntax_suggest] Change assertion to not rely on exact text from prism</title>
<updated>2023-12-05T18:25:42+00:00</updated>
<author>
<name>Schneems</name>
<email>richard.schneeman+foo@gmail.com</email>
</author>
<published>2023-12-05T18:24:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=82883dc8f2343913eb9df32fda6798b2f969dfee'/>
<id>82883dc8f2343913eb9df32fda6798b2f969dfee</id>
<content type='text'>
The original ripper test was very stable as the output didn't change. Prism is under active development and changing their output shouldn't cause a failure to the ruby/ruby test suite like https://github.com/ruby/ruby/actions/runs/7104601478/job/19339940315.

This commit moves from checking exact output to asserting that the string we get back is not empty. This should give the same level of confidence that some error message was caught, and is less brittle.

https://github.com/ruby/syntax_suggest/commit/4b6abb763e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The original ripper test was very stable as the output didn't change. Prism is under active development and changing their output shouldn't cause a failure to the ruby/ruby test suite like https://github.com/ruby/ruby/actions/runs/7104601478/job/19339940315.

This commit moves from checking exact output to asserting that the string we get back is not empty. This should give the same level of confidence that some error message was caught, and is less brittle.

https://github.com/ruby/syntax_suggest/commit/4b6abb763e
</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] Bump minimum Ruby version &amp; update standardrb</title>
<updated>2023-12-04T22:29:44+00:00</updated>
<author>
<name>Schneems</name>
<email>richard.schneeman+foo@gmail.com</email>
</author>
<published>2023-12-04T22:19:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5a2d70ef73d4d17f5999f5087499a5eda1126567'/>
<id>5a2d70ef73d4d17f5999f5087499a5eda1126567</id>
<content type='text'>
https://github.com/ruby/syntax_suggest/commit/73753518e9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/syntax_suggest/commit/73753518e9
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/syntax_suggest] Update standardrb to Ruby 3.0 standards</title>
<updated>2023-12-04T22:18:40+00:00</updated>
<author>
<name>Schneems</name>
<email>richard.schneeman+foo@gmail.com</email>
</author>
<published>2023-12-04T22:17:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=13482ab1e61e0c337badd6308412621f807df9c1'/>
<id>13482ab1e61e0c337badd6308412621f807df9c1</id>
<content type='text'>
https://github.com/ruby/syntax_suggest/commit/2771dcabe0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/syntax_suggest/commit/2771dcabe0
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/syntax_suggest] Handle new eval source location</title>
<updated>2023-07-20T17:58:52+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2023-07-17T09:41:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=460c27dc15b5efc46a74cb2a7809ca3fa6ce72a7'/>
<id>460c27dc15b5efc46a74cb2a7809ca3fa6ce72a7</id>
<content type='text'>
See https://bugs.ruby-lang.org/issues/19755

In Ruby 3.3, using `eval` without providing a source location
will now default to `"(eval at #{__FILE__}:#{__LINE__})"`.

https://github.com/ruby/syntax_suggest/commit/8e5076472e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See https://bugs.ruby-lang.org/issues/19755

In Ruby 3.3, using `eval` without providing a source location
will now default to `"(eval at #{__FILE__}:#{__LINE__})"`.

https://github.com/ruby/syntax_suggest/commit/8e5076472e
</pre>
</div>
</content>
</entry>
<entry>
<title>Manually merge syntax_suggest-1.1.0</title>
<updated>2023-05-23T01:05:47+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-05-23T01:05:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a7d70321005d302d9b5aaa2b83569aa899a5aaa9'/>
<id>a7d70321005d302d9b5aaa2b83569aa899a5aaa9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
