General

Profile

sawa (Tsuyoshi Sawada)

  • Login: sawa
  • Registered on: 04/27/2011
  • Last sign in: 10/29/2025

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 55 141 196

Activity

12/09/2023

06:21 AM Ruby Feature #20054 (Rejected): Replace the use of `def` in endless method definitions with a new sigil
I propose to remove the use of keyword `def` from the syntax of endless method definition, and introduce a new sigil instead of it. There are several possibilities for what character to use as the sigil, but the most seemingly promising ... sawa (Tsuyoshi Sawada)

11/30/2023

06:29 AM Ruby Misc #20015: Privacy policy for ruby-lang.org
I would like to point out a few syntax errors in the published description or expressions whose meaning most likely departs from what was actually intended.
1
> We will not give away your email address to anyone, who is not related to ...
sawa (Tsuyoshi Sawada)

10/29/2023

05:51 AM Ruby Feature #19978: NoMethodError and large objects should not create unwieldy error messages
If displaying the instance is not important for a NoMethodError, then getting rid of it entirely may make it simpler.
```rb
-e:1:in `<main>': undefined method `/' for Array instance (NoMethodError)
(1..1e3).to_a/=3
^...
sawa (Tsuyoshi Sawada)
05:42 AM Ruby Feature #19978: NoMethodError and large objects should not create unwieldy error messages
Do you intend the elided inspect form to be defined for each class, or should it be a result of simple string ellipsis on a fully expanded inspect string (e.g., take the first ten and last seventeen characters from inspection, as in your... sawa (Tsuyoshi Sawada)

10/18/2023

01:10 AM Ruby Feature #19931: to_int is not for implicit conversion?
Your description suggests a contrast between `to_int` and `to_i`, but while you showed a code example using `to_int`, you have not shown anything using `to_i`. Furthermore, actually replacing `to_int` in your code with `to_i` does not se... sawa (Tsuyoshi Sawada)

10/08/2023

04:30 AM Ruby Feature #19884: Make Safe Navigation Operator work on classes
sawa (Tsuyoshi Sawada) wrote:
> > > > You stated that you want &. to work on classes, but that does not make sense. If ActiveRecord::Base is not defined, it is not a class. How would Ruby know that it is (supposed to be) a class?
p8 ...
sawa (Tsuyoshi Sawada)

10/07/2023

11:37 AM Ruby Feature #19884: Make Safe Navigation Operator work on classes
p8 (Petrik de Heus) wrote in #note-5:
> > Furthermore, the specification you are asking for is not clear. What Exception classes do you want `&.` to rescue?
> ...
Then you should edit and write that in the description.
> `defined?` ...
sawa (Tsuyoshi Sawada)

09/22/2023

07:59 AM Ruby Feature #19744: Namespace on read
It may be useful to allow a code block if that does not cause a trouble.
```rb
require "my_module"
NameSpace.new do
self # => #<NameSpace:0x00...>
require "my_module"
MyModule.object_id != ::MyModule.object_id # => true
end
```
sawa (Tsuyoshi Sawada)

09/18/2023

01:10 PM Ruby Feature #19889 (Feedback): Let `Kernel.#require` search for files relative to the current working directory for non ./, ../ relative paths
My understanding is that `./` and `../` in the given path argument are interpreted relative to:
(1)
* The current working directory (for `load` or `require`)
* The requiring file's path (for `require_relative`)
which shows a divi...
sawa (Tsuyoshi Sawada)

09/15/2023

08:11 AM Ruby Feature #19884: Make Safe Navigation Operator work on classes
Currently, you can do `ActiveRecord::Base.some_method rescue nil`
Using `&.` for rescuing an error in addition to the current behavior would make it confusing.
Furthermore, the specification you are asking for is not clear. What Except...
sawa (Tsuyoshi Sawada)

Also available in: Atom