ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:99506] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
@ 2020-08-07  0:27 ` naumovvladislav
  2022-06-10  2:24 ` [ruby-core:108840] " ioquatix (Samuel Williams)
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: naumovvladislav @ 2020-08-07  0:27 UTC (permalink / raw)
  To: ruby-core

Issue #16495 has been updated by vlad0337187 (Vladislav Ivanov).


Some terminals don't highlight text inside different quotes (for example, Iterm2, Terminal on Mac).
So you're going to double-click, copy; but have to highlight text manually.

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-86963

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:108840] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
  2020-08-07  0:27 ` [ruby-core:99506] [Ruby master Feature#16495] Inconsistent quotes in error messages naumovvladislav
@ 2022-06-10  2:24 ` ioquatix (Samuel Williams)
  2022-06-15  3:23 ` [ruby-core:108923] " nobu (Nobuyoshi Nakada)
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: ioquatix (Samuel Williams) @ 2022-06-10  2:24 UTC (permalink / raw)
  To: ruby-core

Issue #16495 has been updated by ioquatix (Samuel Williams).


The more pervasive Markdown becomes, the more annoying this quoting style becomes.

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-97918

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:108923] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
  2020-08-07  0:27 ` [ruby-core:99506] [Ruby master Feature#16495] Inconsistent quotes in error messages naumovvladislav
  2022-06-10  2:24 ` [ruby-core:108840] " ioquatix (Samuel Williams)
@ 2022-06-15  3:23 ` nobu (Nobuyoshi Nakada)
  2022-06-15 10:03 ` [ruby-core:108926] " ioquatix (Samuel Williams)
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: nobu (Nobuyoshi Nakada) @ 2022-06-15  3:23 UTC (permalink / raw)
  To: ruby-core

Issue #16495 has been updated by nobu (Nobuyoshi Nakada).


zverok (Victor Shepelev) wrote in #note-12:
> Because error messages are by their nature something you frequently want to communicate quickly and inline? 
> Here are some examples of backtick breaking communication: https://gist.github.com/zverok/a4fcacab3dc06d9d7585c82cad8a8dc6

Why don't you use double- or triple-backticks?

> Ugh, do you know why am I having ``undefined local variable or method `foo' for main:Object?``.. I expected it to work for `Logger`.


----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-98008

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:108926] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2022-06-15  3:23 ` [ruby-core:108923] " nobu (Nobuyoshi Nakada)
@ 2022-06-15 10:03 ` ioquatix (Samuel Williams)
  2022-06-15 11:28 ` [ruby-core:108927] " nobu (Nobuyoshi Nakada)
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: ioquatix (Samuel Williams) @ 2022-06-15 10:03 UTC (permalink / raw)
  To: ruby-core

Issue #16495 has been updated by ioquatix (Samuel Williams).


> Why don't you use double- or triple-backticks?

Because that doesn't work for inline Markdown.

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-98011

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:108927] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2022-06-15 10:03 ` [ruby-core:108926] " ioquatix (Samuel Williams)
@ 2022-06-15 11:28 ` nobu (Nobuyoshi Nakada)
  2022-06-15 12:09 ` [ruby-core:108929] " ioquatix (Samuel Williams)
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: nobu (Nobuyoshi Nakada) @ 2022-06-15 11:28 UTC (permalink / raw)
  To: ruby-core

Issue #16495 has been updated by nobu (Nobuyoshi Nakada).


https://daringfireball.net/projects/markdown/syntax#code
> To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters:
> 
>     ``There is a literal backtick (`) here.``
> which will produce this:
> 
>     <p><code>There is a literal backtick (`) here.</code></p>
> 

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-98012

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:108929] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2022-06-15 11:28 ` [ruby-core:108927] " nobu (Nobuyoshi Nakada)
@ 2022-06-15 12:09 ` ioquatix (Samuel Williams)
  2022-06-15 12:49 ` [ruby-core:108930] " nobu (Nobuyoshi Nakada)
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: ioquatix (Samuel Williams) @ 2022-06-15 12:09 UTC (permalink / raw)
  To: ruby-core

Issue #16495 has been updated by ioquatix (Samuel Williams).


Not sure if it's well supported, it doesn't work in GitHub issue title which is one place where I have this problem.

https://github.com/socketry/async/issues/50

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-98014

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:108930] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (5 preceding siblings ...)
  2022-06-15 12:09 ` [ruby-core:108929] " ioquatix (Samuel Williams)
@ 2022-06-15 12:49 ` nobu (Nobuyoshi Nakada)
  2022-06-15 13:02 ` [ruby-core:108932] " zverok (Victor Shepelev)
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: nobu (Nobuyoshi Nakada) @ 2022-06-15 12:49 UTC (permalink / raw)
  To: ruby-core

Issue #16495 has been updated by nobu (Nobuyoshi Nakada).


As it seems working in other than titles, it would be an issue of GitHub.
You should report it to GitHub, not here.

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-98015

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:108932] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (6 preceding siblings ...)
  2022-06-15 12:49 ` [ruby-core:108930] " nobu (Nobuyoshi Nakada)
@ 2022-06-15 13:02 ` zverok (Victor Shepelev)
  2022-06-15 14:20 ` [ruby-core:108933] " sawa (Tsuyoshi Sawada)
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: zverok (Victor Shepelev) @ 2022-06-15 13:02 UTC (permalink / raw)
  To: ruby-core

Issue #16495 has been updated by zverok (Victor Shepelev).


@nobu Even where it works, it is not common knowledge of the way to hack around the **necessity** to post a singular backtick. Note that it was discovered in the current issue after **2 years of a discussion**. (I use markdown almost every day since it was invented, and wrote some toy parsers/transformers for it, and still I didn't know about the two-backticks trick, because of how rarely this need arises)

What the people do every day and everywhere is pasting Ruby exception messages, seeing them converted, becoming frustrated, editing; rinse, repeat. Which is the cause of the current issue.

I wonder what is the **necessity** to preserve this legacy convention of ``assimetric `quotes'``?.. Just because it is already this way?.. (If you ask me, it irked me always as also looking weird in the terminal, but maybe it is something personal)(

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-98016

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:108933] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (7 preceding siblings ...)
  2022-06-15 13:02 ` [ruby-core:108932] " zverok (Victor Shepelev)
@ 2022-06-15 14:20 ` sawa (Tsuyoshi Sawada)
  2022-06-15 15:43 ` [ruby-core:108934] " austin (Austin Ziegler)
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: sawa (Tsuyoshi Sawada) @ 2022-06-15 14:20 UTC (permalink / raw)
  To: ruby-core

Issue #16495 has been updated by sawa (Tsuyoshi Sawada).


zverok (Victor Shepelev) wrote in #note-21:
>  (If you ask me, it irked me always as also looking weird in the terminal, but maybe it is something personal)(

Speaking of irking, the weird practice of putting three periods before and after a code block cited in a text, just like how this issue originally was written before my edit https://bugs.ruby-lang.org/journals/83743/diff?detail_id=56117 , is much more irking than using `` `' `` for quotes. The author of this issue should have at least payed attention to use correct punctuation when discussing punctuation. This proposal is very unconvincing.

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-98017

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:108934] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (8 preceding siblings ...)
  2022-06-15 14:20 ` [ruby-core:108933] " sawa (Tsuyoshi Sawada)
@ 2022-06-15 15:43 ` austin (Austin Ziegler)
  2022-06-15 16:21 ` [ruby-core:108935] " zverok (Victor Shepelev)
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: austin (Austin Ziegler) @ 2022-06-15 15:43 UTC (permalink / raw)
  To: ruby-core

Issue #16495 has been updated by austin (Austin Ziegler).


zverok (Victor Shepelev) wrote in #note-21:
> I wonder what is the **necessity** to preserve this legacy convention of ``assimetric `quotes'``?.. Just because it is already this way?.. (If you ask me, it irked me always as also looking weird in the terminal, but maybe it is something personal)

It’s not personal, it‘s based on the fact that the terminal emulators we have been using for a very long time have not supported the exact same fonts as the terminals did, even back in 1989 when I got access. Right now, `'` is usually displayed as a vertical quarter bar from the top, but it was displayed on most VT series terminals the same as `’` (raised comma). `` ` `` wasn’t shown as a bare grave accent, but was shown as a raised reversed comma, or `‛`.

Like you, I did not know the double backtick trick, even though I’ve been using Markdown since *very* early (and you need spaces for `` ` `` to work, per the Common Mark spec https://spec.commonmark.org/0.30/#code-spans).

Many editors expect GNU-style quoting, so changing the formatting for Ruby would have substantial downstream impact (https://cs.github.com/gcc-mirror/gcc?q=%2F%60%25s%27%2F).

There’s strong opinions (https://english.stackexchange.com/questions/17695/any-reference-on-the-usage-of-a-backtick-and-single-quotation-mark-like-this/) about whether it’s good or bad practice, and I’d love to see it change entirely, but that may be asking a bit much from an entire computer industry.

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-98018

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:108935] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (9 preceding siblings ...)
  2022-06-15 15:43 ` [ruby-core:108934] " austin (Austin Ziegler)
@ 2022-06-15 16:21 ` zverok (Victor Shepelev)
  2024-01-03 13:28 ` [ruby-core:115993] " ivoanjo (Ivo Anjo) via ruby-core
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: zverok (Victor Shepelev) @ 2022-06-15 16:21 UTC (permalink / raw)
  To: ruby-core

Issue #16495 has been updated by zverok (Victor Shepelev).


> the weird practice of putting three periods before and after a code block cited in a text

It is a cultural difference. In many languages/writing conventions, three dots is a sign of "phrase broken in the middle". Can be used when leaving the text unfinished ("I thought it would work, but..."), or to mark a place of insertion of a different content that breaks the text flow, to signify that the phrase continues below: "I've seen photos like... {picture} ...and always thought that it is beautiful".

As a Russian/Ukrainian speaker, I find it natural (note that I am not an original ticket's author, though). In American English, the breaking is more frequently signified with — ("I thought it would work, but—").

That being said, I find your marking it as a "weird practice" and fixing other people's punctuation you find "weird", as well as it being used as a response to my note on my personal perception of exception rendering pretty flabbergasting. 

I will stop commenting on this ticket, then.

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-98019

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:115993] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (10 preceding siblings ...)
  2022-06-15 16:21 ` [ruby-core:108935] " zverok (Victor Shepelev)
@ 2024-01-03 13:28 ` ivoanjo (Ivo Anjo) via ruby-core
  2024-01-03 13:33 ` [ruby-core:115994] " mdalessio (Mike Dalessio) via ruby-core
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: ivoanjo (Ivo Anjo) via ruby-core @ 2024-01-03 13:28 UTC (permalink / raw)
  To: ruby-core; +Cc: ivoanjo (Ivo Anjo)

Issue #16495 has been updated by ivoanjo (Ivo Anjo).


matz (Yukihiro Matsumoto) wrote in #note-7:
> It was something cultural. I admit nowadays very few people use backquote as a left-hand quote, but it used to be. I also admit consistent quotes are easier for our eyes when using recent major fonts. But changing those quotes may affect existing log parsers. We have to estimate how big is the influence of the changes.
> 
> Matz.

On the topic of impacting the ecosystem, there have been quite a few changes to how exceptions have been displayed recently:

* https://bugs.ruby-lang.org/issues/17930
* https://bugs.ruby-lang.org/issues/18564

and even more being discussed https://bugs.ruby-lang.org/issues/19117 .

Overall the impact on the ecosystem seemed quite small, and the gain in usability was nice. So changing the `` ` `` to a `'` doesn't seem like it would be worse than any of those changes.

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-105958

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:115994] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (11 preceding siblings ...)
  2024-01-03 13:28 ` [ruby-core:115993] " ivoanjo (Ivo Anjo) via ruby-core
@ 2024-01-03 13:33 ` mdalessio (Mike Dalessio) via ruby-core
  2024-01-04  0:31 ` [ruby-core:116002] " joshuap (Josh Wood) via ruby-core
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: mdalessio (Mike Dalessio) via ruby-core @ 2024-01-03 13:33 UTC (permalink / raw)
  To: ruby-core; +Cc: mdalessio (Mike Dalessio)

Issue #16495 has been updated by mdalessio (Mike Dalessio).


It may be interesting to note that the Prism parser has adopted a style guide for error messages, which avoids using the mixed quotes, and uses backticks around token literals to render well in markdown.

https://github.com/ruby/prism/blob/main/src/diagnostic.c


----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-105959

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:116002] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (12 preceding siblings ...)
  2024-01-03 13:33 ` [ruby-core:115994] " mdalessio (Mike Dalessio) via ruby-core
@ 2024-01-04  0:31 ` joshuap (Josh Wood) via ruby-core
  2024-01-18  7:54 ` [ruby-core:116295] " matz (Yukihiro Matsumoto) via ruby-core
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: joshuap (Josh Wood) via ruby-core @ 2024-01-04  0:31 UTC (permalink / raw)
  To: ruby-core; +Cc: joshuap (Josh Wood)

Issue #16495 has been updated by joshuap (Josh Wood).


ivoanjo (Ivo Anjo) wrote in #note-25:
> matz (Yukihiro Matsumoto) wrote in #note-7:
> > It was something cultural. I admit nowadays very few people use backquote as a left-hand quote, but it used to be. I also admit consistent quotes are easier for our eyes when using recent major fonts. But changing those quotes may affect existing log parsers. We have to estimate how big is the influence of the changes.
> > 
> > Matz.
> 
> On the topic of impacting the ecosystem, there have been quite a few changes to how exceptions have been displayed recently:
> 
> * https://bugs.ruby-lang.org/issues/17930
> * https://bugs.ruby-lang.org/issues/18564
> 
> and even more being discussed https://bugs.ruby-lang.org/issues/19117 .
> 
> Overall the impact on the ecosystem seemed quite small, and the gain in usability was nice. So changing the `` ` `` to a `'` doesn't seem like it would be worse than any of those changes.

To chime in here, at Honeybadger we use this regular expression to parse the Ruby backtrace: https://github.com/honeybadger-io/honeybadger-ruby/blob/edc815c136c5d61fb4e8363b2ffafedef246e4fc/lib/honeybadger/backtrace.rb#L10

I don't think it should be too difficult for us to support both the old and new quote formats. As a Ruby user myself, I always found the backtick to be odd, and wasn't aware of the history, which is fascinating.

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-105997

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:116295] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (13 preceding siblings ...)
  2024-01-04  0:31 ` [ruby-core:116002] " joshuap (Josh Wood) via ruby-core
@ 2024-01-18  7:54 ` matz (Yukihiro Matsumoto) via ruby-core
  2024-01-18 13:43 ` [ruby-core:116296] " Dan0042 (Daniel DeLorme) via ruby-core
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: matz (Yukihiro Matsumoto) via ruby-core @ 2024-01-18  7:54 UTC (permalink / raw)
  To: ruby-core; +Cc: matz (Yukihiro Matsumoto)

Issue #16495 has been updated by matz (Yukihiro Matsumoto).


I agree with giving up backquotes. I'd rather use single quote pairs, unless any compatibility issues are caused.

Matz.


----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-106317

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:116296] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (14 preceding siblings ...)
  2024-01-18  7:54 ` [ruby-core:116295] " matz (Yukihiro Matsumoto) via ruby-core
@ 2024-01-18 13:43 ` Dan0042 (Daniel DeLorme) via ruby-core
  2024-01-18 15:24 ` [ruby-core:116299] " Eregon (Benoit Daloze) via ruby-core
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: Dan0042 (Daniel DeLorme) via ruby-core @ 2024-01-18 13:43 UTC (permalink / raw)
  To: ruby-core; +Cc: Dan0042 (Daniel DeLorme)

Issue #16495 has been updated by Dan0042 (Daniel DeLorme).


I'd like something that's convenient to copy-paste. Testing:

with single quote pair:
undefined local variable or method 'foobar' for main:Object (NameError)
`undefined local variable or method 'foobar' for main:Object (NameError)`
``undefined local variable or method 'foobar' for main:Object (NameError)``

with backtick pair:
undefined local variable or method `foobar` for main:Object (NameError)
`undefined local variable or method `foobar` for main:Object (NameError)`
``undefined local variable or method `foobar` for main:Object (NameError)``

At first I preferred backticks but given how the above are rendered in markdown I've ended up preferring single quotes.

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-106318

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:116299] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (15 preceding siblings ...)
  2024-01-18 13:43 ` [ruby-core:116296] " Dan0042 (Daniel DeLorme) via ruby-core
@ 2024-01-18 15:24 ` Eregon (Benoit Daloze) via ruby-core
  2024-01-18 20:28 ` [ruby-core:116310] " mame (Yusuke Endoh) via ruby-core
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: Eregon (Benoit Daloze) via ruby-core @ 2024-01-18 15:24 UTC (permalink / raw)
  To: ruby-core; +Cc: Eregon (Benoit Daloze)

Issue #16495 has been updated by Eregon (Benoit Daloze).


Great to see progress on this issue.
Agreed, for method names and file names, single quotes are best.
Backticks are best for quoting source code, and there is no source code in Ruby backtraces.

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-106321

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:116310] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (16 preceding siblings ...)
  2024-01-18 15:24 ` [ruby-core:116299] " Eregon (Benoit Daloze) via ruby-core
@ 2024-01-18 20:28 ` mame (Yusuke Endoh) via ruby-core
  2024-01-19  7:45 ` [ruby-core:116313] " mame (Yusuke Endoh) via ruby-core
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: mame (Yusuke Endoh) via ruby-core @ 2024-01-18 20:28 UTC (permalink / raw)
  To: ruby-core; +Cc: mame (Yusuke Endoh)

Issue #16495 has been updated by mame (Yusuke Endoh).


Let me add a little to the matz's decision.

At the dev meeting, he said that we will replace with a single quote, not only the backticks for `NameError#message`, but also the ones for other exception messages (e.g., ``no superclass method `foo'``) and the ones surrounding the names of methods in the backtrace (e.g., ``from test.rb:2:in `foo'``).

Matz also wants to experiment with #19117 as well, and I am writing an experimental patch for that. If this is also applied, each line of the backtrace will be

```
before: from test.rb:9:in `foo'
after : from test.rb:9:in `Kernel#p'
```

We recognize that both this ticket and #19117 are not small incompatibilities, so if they actually change, it would be nice to change them both at once.

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-106334

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:116313] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (17 preceding siblings ...)
  2024-01-18 20:28 ` [ruby-core:116310] " mame (Yusuke Endoh) via ruby-core
@ 2024-01-19  7:45 ` mame (Yusuke Endoh) via ruby-core
  2024-02-14  5:05 ` [ruby-core:116728] " matz (Yukihiro Matsumoto) via ruby-core
  2024-02-17 22:22 ` [ruby-core:116828] " ioquatix (Samuel Williams) via ruby-core
  20 siblings, 0 replies; 21+ messages in thread
From: mame (Yusuke Endoh) via ruby-core @ 2024-01-19  7:45 UTC (permalink / raw)
  To: ruby-core; +Cc: mame (Yusuke Endoh)

Issue #16495 has been updated by mame (Yusuke Endoh).


I prototyped it: https://github.com/ruby/ruby/pull/9608

Still need to update prism and ruby/spec.

For information in impact assessment: this change made 140 tests fail in `make test-all`. Many of them examined error messages, which could be fixed by simply updating the expected regular expression. But there were some non-trivial effects, e.g., irb converts the error message from `` `top (required)' `` to `` `<main>' ``, so this conversion code is also updated.

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-106337

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:116728] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (18 preceding siblings ...)
  2024-01-19  7:45 ` [ruby-core:116313] " mame (Yusuke Endoh) via ruby-core
@ 2024-02-14  5:05 ` matz (Yukihiro Matsumoto) via ruby-core
  2024-02-17 22:22 ` [ruby-core:116828] " ioquatix (Samuel Williams) via ruby-core
  20 siblings, 0 replies; 21+ messages in thread
From: matz (Yukihiro Matsumoto) via ruby-core @ 2024-02-14  5:05 UTC (permalink / raw)
  To: ruby-core; +Cc: matz (Yukihiro Matsumoto)

Issue #16495 has been updated by matz (Yukihiro Matsumoto).


I am positive. I'd say go. We need to experiment anyway.

Matz.


----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-106747

* Author: Kolano (Kenneth Kolano)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [ruby-core:116828] [Ruby master Feature#16495] Inconsistent quotes in error messages
       [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
                   ` (19 preceding siblings ...)
  2024-02-14  5:05 ` [ruby-core:116728] " matz (Yukihiro Matsumoto) via ruby-core
@ 2024-02-17 22:22 ` ioquatix (Samuel Williams) via ruby-core
  20 siblings, 0 replies; 21+ messages in thread
From: ioquatix (Samuel Williams) via ruby-core @ 2024-02-17 22:22 UTC (permalink / raw)
  To: ruby-core; +Cc: ioquatix (Samuel Williams)

Issue #16495 has been updated by ioquatix (Samuel Williams).


For reference, so far I had to make one fix:

- https://github.com/socketry/async/compare/2c5f92ed2027...44b2060dffd7

It was minor and compatibility with both styles is trivial.

----------------------------------------
Feature #16495: Inconsistent quotes in error messages
https://bugs.ruby-lang.org/issues/16495#change-106853

* Author: Kolano (Kenneth Kolano)
* Status: Closed
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
Error messages use inconsistent pairs of quotes, for instance:

```
-e:1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
```

where a back tick is used on the left-hand side, and a single quote is used on the right.

The same quotes should be used on either side of the elements being quoted.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2024-02-17 22:22 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-16495.20200109215418.32676@ruby-lang.org>
2020-08-07  0:27 ` [ruby-core:99506] [Ruby master Feature#16495] Inconsistent quotes in error messages naumovvladislav
2022-06-10  2:24 ` [ruby-core:108840] " ioquatix (Samuel Williams)
2022-06-15  3:23 ` [ruby-core:108923] " nobu (Nobuyoshi Nakada)
2022-06-15 10:03 ` [ruby-core:108926] " ioquatix (Samuel Williams)
2022-06-15 11:28 ` [ruby-core:108927] " nobu (Nobuyoshi Nakada)
2022-06-15 12:09 ` [ruby-core:108929] " ioquatix (Samuel Williams)
2022-06-15 12:49 ` [ruby-core:108930] " nobu (Nobuyoshi Nakada)
2022-06-15 13:02 ` [ruby-core:108932] " zverok (Victor Shepelev)
2022-06-15 14:20 ` [ruby-core:108933] " sawa (Tsuyoshi Sawada)
2022-06-15 15:43 ` [ruby-core:108934] " austin (Austin Ziegler)
2022-06-15 16:21 ` [ruby-core:108935] " zverok (Victor Shepelev)
2024-01-03 13:28 ` [ruby-core:115993] " ivoanjo (Ivo Anjo) via ruby-core
2024-01-03 13:33 ` [ruby-core:115994] " mdalessio (Mike Dalessio) via ruby-core
2024-01-04  0:31 ` [ruby-core:116002] " joshuap (Josh Wood) via ruby-core
2024-01-18  7:54 ` [ruby-core:116295] " matz (Yukihiro Matsumoto) via ruby-core
2024-01-18 13:43 ` [ruby-core:116296] " Dan0042 (Daniel DeLorme) via ruby-core
2024-01-18 15:24 ` [ruby-core:116299] " Eregon (Benoit Daloze) via ruby-core
2024-01-18 20:28 ` [ruby-core:116310] " mame (Yusuke Endoh) via ruby-core
2024-01-19  7:45 ` [ruby-core:116313] " mame (Yusuke Endoh) via ruby-core
2024-02-14  5:05 ` [ruby-core:116728] " matz (Yukihiro Matsumoto) via ruby-core
2024-02-17 22:22 ` [ruby-core:116828] " ioquatix (Samuel Williams) via ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).