file.rb(path)
__FILE__
in Ruby is a predefined constant that represents the current file’s name. It returns a string with the name of the file in which it is used.
Execution:
__FILE__
#=> "file.rb(irb)"
Executed with Ruby 3.3.6
__FILE__
in Ruby is a predefined constant that represents the current file’s name. It returns a string with the name of the file in which it is used.
__FILE__
#=> "file.rb(irb)"
Executed with Ruby 3.3.6