General

Profile

ttanimichi (Tsukuru Tanimichi)

  • Login: ttanimichi
  • Registered on: 05/07/2017
  • Last sign in: 04/08/2025

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 4 5

Activity

06/14/2023

07:35 AM Ruby Bug #19731 (Closed): Can’t call an instance method inside an Endless method definition
Can’t call an instance method inside an Endless method definition.
```
$ ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
$ cat withend.rb
class A
def show
puts 'ok' if params
end
def params
...
ttanimichi (Tsukuru Tanimichi)

08/02/2022

02:15 AM Ruby Bug #18953 (Rejected): `Array#uniq` doesn't evaluate the given block when the size of the array is one
`Array#uniq` doesn't evaluate the given block when the size of the array is one. Is this expected behavior?
```
$ ruby -e '[42, 43].uniq { _1.foo }; puts true'
-e:1:in `block in <main>': undefined method `foo' for 42:Integer (NoMeth...
ttanimichi (Tsukuru Tanimichi)

07/19/2022

02:41 AM Ruby Feature #12648: `Enumerable#sort_by` with descending option
It's a lot of work to write `sort_by { -1 * _1.created_at.to_f }` when the target objects are `Time` instances.
```ruby
['foo', 'bar', 'baz'].map { search(_1) }.flatten.sort_by { -1 * _1.created_at.to_f }
def search(query)
clie...
ttanimichi (Tsukuru Tanimichi)

08/08/2021

02:30 PM Ruby Feature #18069 (Open): `instance_exec` is just ignored when the block is originally a method

I know you can't `instance_exec` a proc which is generated by `Method#to_proc` because it has its original instance's context. But, in such a case, raising `ArgumentError` would be the ideal behavior.
```ruby
f = -> (x) { a + x }
...
ttanimichi (Tsukuru Tanimichi)
01:09 PM Ruby Bug #18067 (Rejected): Composite procs with `instance_exec` aren't executed within the context of the receiver
```ruby
func1 = -> (x) { x + y }
class A
def y
10
end
end
A.new.instance_exec(1, &func1) # => 11
func2 = -> (x) { x * 2 }
f = func1 >> func2
A.new.instance_exec(1, &f) # => undefined local variable or method `y' f...
ttanimichi (Tsukuru Tanimichi)

05/31/2021

12:31 PM Ruby Feature #17930: Add column information into error backtrace
Hi, I like this idea!
This feature would be quite useful when you get `NoMethodError` in the production environment and error tracking tools like [Sentry](https://sentry.io/welcome/) inform you of that error.
Consider the example I've at...
ttanimichi (Tsukuru Tanimichi)

06/27/2020

12:37 PM Ruby Feature #16986: Anonymous Struct literal
`struct = (a: 1, b: 2)` would be a great syntax, because I think anonymous struct is something like Tuple of Python.
But, there are two problems:
1. `()` returns `nil`, not an empty struct.
2. The meaning of `p(a: 1)` and `p (a: 1)...
ttanimichi (Tsukuru Tanimichi)

04/11/2018

10:21 AM Ruby Bug #14678 (Closed): Segmentation fault in pg
This error don't reproduce in Ruby 2.5.0 but reproduce in 2.5.1
~~~
$ bundle ex rspec
/Users/tanimichi.tsukuru/ghq/github.com/moneyforward/moneyplus/vendor/bundle/ruby/2.5.0/gems/pg-0.21.0/lib/pg.rb:56: [BUG] Segmentation fault at 0...
ttanimichi (Tsukuru Tanimichi)

10/10/2017

11:25 AM Ruby Feature #13812: Refinements で定義した to_s を String interpolation が呼んでくれない
ruby 2.5.0preview1 で期待通り動いていることを確認できました。ありがとうございました。
ttanimichi (Tsukuru Tanimichi)

09/17/2017

01:05 PM Ruby Feature #13812: Refinements で定義した to_s を String interpolation が呼んでくれない
hsbt さん
RubyKaigi でお忙しいところすみません、
hsbt さんに聞くのが適切か分かりませんが、もしよろしければ相談させてください。
本件、すでに nobu さんのパッチがあり、
まつもとさんの承認も得られていますが、どうされますか?
仕様変更の議論なので英語でやった方が良かったかなとも思うんですが、
既にまつもとさんの承認も得られていますし、こういう場合って普段どうされてます?
また、英語で議論する場合、
> 英語で新規...
ttanimichi (Tsukuru Tanimichi)

Also available in: Atom