General

Profile

lsegal (Loren Segal)

  • Login: lsegal
  • Email: lsegal@soen.ca
  • Registered on: 08/08/2009
  • Last sign in: 03/07/2020

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 7 7

Activity

03/06/2020

09:15 PM Ruby Bug #16675: Regression on Ripper in Ruby 2.7 when parsing new line
> Ripper doesn't fire the events in the order of the source, typically around here-documents.
Can you explain issue with here-documents? AFAIK, having used Ripper for over a decade now, this is the first time we've identified Ripper fir...
lsegal (Loren Segal)
09:42 AM Ruby Bug #16675 (Open): Regression on Ripper in Ruby 2.7 when parsing new line
I'm not sure why this was closed so quickly. There is a real bug here affecting many users who indirectly rely on this core library.
It may be the case that comments can be placed between dots, but that should not affect parsing order...
lsegal (Loren Segal)

06/23/2016

07:21 AM Ruby Feature #12515: Create "Boolean" superclass of TrueClass / FalseClass
In reality it's very common to treat `true`/`false` as a separate thing. The "everything is boolean" argument falls apart when you have something like var args in a method declaration and you want to perform distinct operations based on ... lsegal (Loren Segal)
02:51 AM Ruby Feature #12515: Create "Boolean" superclass of TrueClass / FalseClass
edit: as a sidenote, adding a `Boolean` class to Ruby-core is unlikely to break any of the linked code, because Ruby is just defining an empty `Boolean` class. Existing libraries will just re-open the class as normal. lsegal (Loren Segal)
02:24 AM Ruby Feature #12515: Create "Boolean" superclass of TrueClass / FalseClass
Shyouhei Urabe wrote:
> https://github.com/search?l=ruby&q=%22class+Boolean%22&type=Code
> ...
As Olivier pointed out, isn't this an argument to revert the `Integer` patch? Why is the `Integer` change okay but not `Boolean`?
lsegal (Loren Segal)
01:13 AM Ruby Feature #12515 (Rejected): Create "Boolean" superclass of TrueClass / FalseClass
Since Ruby 2.4 is unifying Bignum/Fixnum into Integer (https://bugs.ruby-lang.org/issues/12005), it seems reasonable to do something similar for TrueClass / FalseClass, and create a proper Boolean hierarchy. The implementation would be f... lsegal (Loren Segal)

04/17/2016

07:54 PM Ruby Bug #12295: Ripper not emitting on_parse_error for global variable name syntax errors
After looking into this a little more it looks like the Ruby error is not a "parse error", though it probably should be? This might no longer be Ripper specific. Ruby just seems to give up on the above code no matter where it is placed i... lsegal (Loren Segal)
07:48 PM Ruby Bug #12295 (Rejected): Ripper not emitting on_parse_error for global variable name syntax errors
Ripper is not emitting the `on_parse_error` event for certain types of syntax errors, specifically for the following snippet of code:
```
:~$
```
Here is the Ruby syntax error:
```
$ ruby -v
ruby 2.3.0p0 (2015-12-25 revision...
lsegal (Loren Segal)

08/24/2015

07:34 PM Ruby Bug #11485 (Closed): Ripper parser generates nil tokens for ignored_nl event during parse errors
This seems to be a regression in the Ripper parser where the `on_ignored_nl` event is passed a nil value for the token parameter in the event when a syntax error occurs. I'm not entirely sure of the details, but this is the most minimal ... lsegal (Loren Segal)

01/04/2015

02:09 AM Ruby Bug #10693 (Closed): Regression in Ripper for keyword arg default params
Easy to reproduce, seems to only be present in 2.2:
```ruby
$ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
$ ruby -rripper -e 'p Ripper.sexp "def x(a:1) end"'
[:program, [[:def, [:@ident, "x", [1, 4]], [:pare...
lsegal (Loren Segal)

Also available in: Atom