HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/share/ri/3.0.0/system/DidYouMean/cdesc-DidYouMean.ri
U:RDoc::NormalModule[iI"DidYouMean:ET@0o:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"NThe +DidYouMean+ gem adds functionality to suggest possible method/class ;TI"Onames upon errors such as +NameError+ and +NoMethodError+. In Ruby 2.3 or ;TI"9later, it is automatically activated during startup.;To:RDoc::Markup::BlankLineo;	;[I"
@example;T@o:RDoc::Markup::Verbatim;[!I"
methosd
;TI"R# => NameError: undefined local variable or method `methosd' for main:Object
;TI" #   Did you mean?  methods
;TI"#                  method
;TI"
;TI"OBject
;TI"3# => NameError: uninitialized constant OBject
;TI" #    Did you mean?  Object
;TI"
;TI"#@full_name = "Yuki Nishijima"
;TI"2first_name, last_name = full_name.split(" ")
;TI"T# => NameError: undefined local variable or method `full_name' for main:Object
;TI"$#    Did you mean?  @full_name
;TI"
;TI"$@@full_name = "Yuki Nishijima"
;TI"@@full_anme
;TI"H# => NameError: uninitialized class variable @@full_anme in Object
;TI"%#    Did you mean?  @@full_name
;TI"
;TI""full_name = "Yuki Nishijima"
;TI"!full_name.starts_with?("Y")
;TI"U# => NoMethodError: undefined method `starts_with?' for "Yuki Nishijima":String
;TI"%#    Did you mean?  start_with?
;TI"
;TI"%hash = {foo: 1, bar: 2, baz: 3}
;TI"hash.fetch(:fooo)
;TI")# => KeyError: key not found: :fooo
;TI"#    Did you mean?  :foo
;T:@format0S:RDoc::Markup::Heading:
leveli:	textI"Disabling +did_you_mean+;T@o;	;[I"KOccasionally, you may want to disable the +did_you_mean+ gem for e.g. ;TI"Qdebugging issues in the error object itself. You can disable it entirely by ;TI"Fspecifying +--disable-did_you_mean+ option to the +ruby+ command:;T@o;;[I"0$ ruby --disable-did_you_mean -e "1.zeor?"
;TI"J-e:1:in `<main>': undefined method `zeor?' for 1:Integer (NameError)
;T;0o;	;[I"DWhen you do not have direct access to the +ruby+ command (e.g. ;TI"I+rails console+, +irb+), you could applyoptions using the +RUBYOPT+ ;TI"environment variable:;T@o;;[I",$ RUBYOPT='--disable-did_you_mean' irb
;TI"irb:0> 1.zeor?
;TI"A# => NoMethodError (undefined method `zeor?' for 1:Integer)
;T;0S;
;i;I"'Getting the original error message;T@o;	;[I"QSometimes, you do not want to disable the gem entirely, but need to get the ;TI"Roriginal error message without suggestions (e.g. testing). In this case, you ;TI"Bcould use the +#original_message+ method on the error object:;T@o;;[I"no_method_error = begin
;TI"!                    1.zeor?
;TI"5                  rescue NoMethodError => error
;TI"                    error
;TI"                  end
;TI"
;TI"no_method_error.message
;TI"A# => NoMethodError (undefined method `zeor?' for 1:Integer)
;TI"#    Did you mean?  zero?
;TI"
;TI"&no_method_error.original_message
;TI"@# => NoMethodError (undefined method `zeor?' for 1:Integer);T;0:
@fileI"lib/did_you_mean.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI"SPELL_CHECKERS;TI"DidYouMean::SPELL_CHECKERS;T:public0o;;[o;	;[I"2Map of error types and spell checker objects.;T;@];0@]@cRDoc::NormalModule0[[[I"
class;T[[;[[I"correct_error;TI"lib/did_you_mean.rb;T[I"formatter;T@s[I"formatter=;T@s[:protected[[:private[[I"
instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;0;0[	@]I"lib/optparse.rb;TI"lib/rubygems/exceptions.rb;TI"2lib/rubygems/unknown_command_spell_checker.rb;T@]cRDoc::TopLevel