<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/prism/prism.h, 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/prism] Follow repo move from oracle/truffleruby to truffleruby/truffleruby</title>
<updated>2025-12-03T16:34:51+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2025-12-03T14:41:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d7dffcdbeeee81bb3bbe63b86620cb682eb3ab23'/>
<id>d7dffcdbeeee81bb3bbe63b86620cb682eb3ab23</id>
<content type='text'>
https://github.com/ruby/prism/commit/c8e1b11120
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/c8e1b11120
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Add `\memberof` annotations</title>
<updated>2025-09-12T19:07:20+00:00</updated>
<author>
<name>Alexander Momchilov</name>
<email>alexander.momchilov@shopify.com</email>
</author>
<published>2024-08-30T20:11:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=869c63bcc3fb8d518fcc5eea30b57299eb07fd03'/>
<id>869c63bcc3fb8d518fcc5eea30b57299eb07fd03</id>
<content type='text'>
https://github.com/ruby/prism/commit/d1d2161219
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/d1d2161219
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Add links to code refs in docs</title>
<updated>2025-09-12T18:40:43+00:00</updated>
<author>
<name>Alexander Momchilov</name>
<email>alexander.momchilov@shopify.com</email>
</author>
<published>2024-08-30T19:02:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=120d3b12a9981f547b07c937dd183c0abe77c6cb'/>
<id>120d3b12a9981f547b07c937dd183c0abe77c6cb</id>
<content type='text'>
https://github.com/ruby/prism/commit/d2d9a1f1a7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/d2d9a1f1a7
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Document lifetime of `pm_options_t`</title>
<updated>2025-09-12T17:36:29+00:00</updated>
<author>
<name>Alexander Momchilov</name>
<email>alexander.momchilov@shopify.com</email>
</author>
<published>2024-09-16T13:45:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0803b9a6acd6634fd24ec9cc53725eafbaccb856'/>
<id>0803b9a6acd6634fd24ec9cc53725eafbaccb856</id>
<content type='text'>
https://github.com/ruby/prism/commit/ed8f6307c1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/ed8f6307c1
</pre>
</div>
</content>
</entry>
<entry>
<title>When reading from stdin, put a wrapper around the IO object</title>
<updated>2025-08-04T19:34:33+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2025-07-17T22:20:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=89d89fa49d387a09e0d3ea7092a598b88d6d86eb'/>
<id>89d89fa49d387a09e0d3ea7092a598b88d6d86eb</id>
<content type='text'>
The purpose of this commit is to fix Bug #21188.  We need to detect when
stdin has run in to an EOF case.  Unfortunately we can't _call_ the eof
function on IO because it will block.

Here is a short script to demonstrate the issue:

```ruby
x = STDIN.gets
puts x
puts x.eof?
```

If you run the script, then type some characters (but _NOT_ a newline),
then hit Ctrl-D twice, it will print the input string.  Unfortunately,
calling `eof?` will try to read from STDIN again causing us to need a
3rd Ctrl-D to exit the program.

Before introducing the EOF callback to Prism, the input loop looked
kind of like this:

```ruby
loop do
  str = STDIN.gets
  process(str)

  if str.nil?
    p :DONE
  end
end
```

Which required 3 Ctrl-D to exit.  If we naively changed it to something
like this:

```ruby
loop do
  str = STDIN.gets
  process(str)

  if STDIN.eof?
    p :DONE
  end
end
```

It would still require 3 Ctrl-D because `eof?` would block.  In this
patch, we're wrapping the IO object, checking the buffer for a newline
and length, and then using that to simulate a non-blocking eof? method.

This commit wraps STDIN and emulates a non-blocking `eof` function.

[Bug #21188]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The purpose of this commit is to fix Bug #21188.  We need to detect when
stdin has run in to an EOF case.  Unfortunately we can't _call_ the eof
function on IO because it will block.

Here is a short script to demonstrate the issue:

```ruby
x = STDIN.gets
puts x
puts x.eof?
```

If you run the script, then type some characters (but _NOT_ a newline),
then hit Ctrl-D twice, it will print the input string.  Unfortunately,
calling `eof?` will try to read from STDIN again causing us to need a
3rd Ctrl-D to exit the program.

Before introducing the EOF callback to Prism, the input loop looked
kind of like this:

```ruby
loop do
  str = STDIN.gets
  process(str)

  if str.nil?
    p :DONE
  end
end
```

Which required 3 Ctrl-D to exit.  If we naively changed it to something
like this:

```ruby
loop do
  str = STDIN.gets
  process(str)

  if STDIN.eof?
    p :DONE
  end
end
```

It would still require 3 Ctrl-D because `eof?` would block.  In this
patch, we're wrapping the IO object, checking the buffer for a newline
and length, and then using that to simulate a non-blocking eof? method.

This commit wraps STDIN and emulates a non-blocking `eof` function.

[Bug #21188]
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Rename fgets parameter to fix NetBSD</title>
<updated>2025-03-02T18:14:36+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2025-03-02T15:53:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=617e8608b2cff8be1d063c2f47ab425cda839d58'/>
<id>617e8608b2cff8be1d063c2f47ab425cda839d58</id>
<content type='text'>
Fixes [Bug #21165]

https://github.com/ruby/prism/commit/3f0acf7560
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes [Bug #21165]

https://github.com/ruby/prism/commit/3f0acf7560
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Prism::StringQuery</title>
<updated>2024-10-11T19:34:57+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-10-11T18:43:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5f62522d5b8bd162ddf657680b8532eadeaae21f'/>
<id>5f62522d5b8bd162ddf657680b8532eadeaae21f</id>
<content type='text'>
Introduce StringQuery to provide methods to access some metadata
about the Ruby lexer.

https://github.com/ruby/prism/commit/d3f55b67b9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce StringQuery to provide methods to access some metadata
about the Ruby lexer.

https://github.com/ruby/prism/commit/d3f55b67b9
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Remove error formatting, put directly in CRuby</title>
<updated>2024-05-24T17:19:36+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-05-24T16:14:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=79001c8b4a35f12b6115916de2f2671168b97ae1'/>
<id>79001c8b4a35f12b6115916de2f2671168b97ae1</id>
<content type='text'>
https://github.com/ruby/prism/commit/53b2866487
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/53b2866487
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Replace . with decimal point for strtod</title>
<updated>2024-04-01T19:39:33+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-04-01T19:28:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b25282e61844334c70def2d678c19c6105646ab3'/>
<id>b25282e61844334c70def2d678c19c6105646ab3</id>
<content type='text'>
https://github.com/ruby/prism/commit/578a4f983e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/578a4f983e
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/prism] Add option for inlining messages for error formatting</title>
<updated>2024-03-27T17:03:11+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-03-27T16:04:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9b816e674a4ecadde047212827e3bbe87cd61345'/>
<id>9b816e674a4ecadde047212827e3bbe87cd61345</id>
<content type='text'>
https://github.com/ruby/prism/commit/af0204a8ab
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/prism/commit/af0204a8ab
</pre>
</div>
</content>
</entry>
</feed>
