Help us understand the problem. What is going on with this article?

Ruby 2.3.0 で組み込まれた gem did_you_mean をオフにする

More than 1 year has passed since last update.

現在はパフォーマンスを考慮した実装になっているため、本番環境で did_you_mean gem を無効にする必要はありません!!

Ruby 2.3.0 で組み込まれた gem did_you_mean は、 Rubyの実行時に --disable-did_you_mean オプションを指定することで無効になります。

オプションをつけない場合


$ ruby test.rb
test.rb:2:in `<main>': undefined method `to_x' for 1:Fixnum (NoMethodError)
Did you mean?  to_c
               to_r
               to_i
               to_f
               to_s

オプションをつけた場合


$ ruby --disable-did_you_mean  test.rb
test.rb:2:in `<main>': undefined method `to_x' for 1:Fixnum (NoMethodError)
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away