End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
Kernel#syntax_suggest_original_load
# File tmp/rubies/ruby-3.2.0/lib/syntax_suggest/core_ext.rb, line 78
def load(file, wrap = false)
syntax_suggest_original_load(file)
rescue SyntaxError => e
require "syntax_suggest/api" unless defined?(SyntaxSuggest::DEFAULT_VALUE)
SyntaxSuggest.handle_error(e)
end
Alias of #load
Loads and executes the Ruby program in the file filename.
If the filename is an absolute path (e.g. starts with ‘/’), the file will be loaded directly using the absolute path.
If the filename is an explicit relative path (e.g. starts with ‘./’ or ‘../’), the file will be loaded using the relative path from the current directory.
Otherwise, the file will be searched for in the library directories listed in $LOAD_PATH ($:). If the file is found in a directory, it will attempt to load the file relative to that directory. If the file is not found in any of the directories in $LOAD_PATH, the file will be loaded using the relative path from the current directory.
If the file doesn’t exist when there is an attempt to load it, a LoadError will be raised.
If the optional wrap parameter is true, the loaded script will be executed under an anonymous module, protecting the calling program’s global namespace. If the optional wrap parameter is a module, the loaded script will be executed under the given module. In no circumstance will any local variables in the loaded file be propagated to the loading environment.