method
execute
v1_8_7_72 -
Show latest stable
-
0 notes -
Class: IRB::ExtendCommand::Require
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378 (0)
- 1_9_2_180 (0)
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
execute(file_name)
public
Hide source
# File lib/irb/cmd/load.rb, line 30 def execute(file_name) # return ruby_require(file_name) unless IRB.conf[:USE_LOADER] rex = Regexp.new("#{Regexp.quote(file_name)}(\.o|\.rb)?") return false if $".find{|f| f =~ rex} case file_name when /\.rb$/ begin if irb_load(file_name) $".push file_name return true end rescue LoadError end when /\.(so|o|sl)$/ return ruby_require(file_name) end begin irb_load(f = file_name + ".rb") $".push f return true rescue LoadError return ruby_require(file_name) end end