[ruby/irb] The command "irb_info" should show RUBY_PLATFORM
https://github.com/ruby/irb/commit/39d1cd874f
This commit is contained in:
parent
b2d2d25b94
commit
6eb5b3ac27
@ -13,6 +13,7 @@ module IRB
|
|||||||
str += "IRB version: #{IRB.version}\n"
|
str += "IRB version: #{IRB.version}\n"
|
||||||
str += "InputMethod: #{IRB.CurrentContext.io.inspect}\n"
|
str += "InputMethod: #{IRB.CurrentContext.io.inspect}\n"
|
||||||
str += ".irbrc path: #{IRB.rc_file}\n" if File.exist?(IRB.rc_file)
|
str += ".irbrc path: #{IRB.rc_file}\n" if File.exist?(IRB.rc_file)
|
||||||
|
str += "RUBY_PLATFORM: #{RUBY_PLATFORM}\n"
|
||||||
str
|
str
|
||||||
end
|
end
|
||||||
alias_method :to_s, :inspect
|
alias_method :to_s, :inspect
|
||||||
|
@ -48,7 +48,8 @@ module TestIRB
|
|||||||
Ruby\sversion: .+\n
|
Ruby\sversion: .+\n
|
||||||
IRB\sversion:\sirb .+\n
|
IRB\sversion:\sirb .+\n
|
||||||
InputMethod:\sReidlineInputMethod\swith\sReline .+ and .+\n
|
InputMethod:\sReidlineInputMethod\swith\sReline .+ and .+\n
|
||||||
\.irbrc\spath: .+
|
\.irbrc\spath: .+\n
|
||||||
|
RUBY_PLATFORM: .+
|
||||||
}x
|
}x
|
||||||
assert_match expected, irb.context.main.irb_info.to_s
|
assert_match expected, irb.context.main.irb_info.to_s
|
||||||
end
|
end
|
||||||
@ -67,7 +68,8 @@ module TestIRB
|
|||||||
Ruby\sversion: .+\n
|
Ruby\sversion: .+\n
|
||||||
IRB\sversion:\sirb .+\n
|
IRB\sversion:\sirb .+\n
|
||||||
InputMethod:\sReadlineInputMethod\swith .+ and .+\n
|
InputMethod:\sReadlineInputMethod\swith .+ and .+\n
|
||||||
\.irbrc\spath: .+
|
\.irbrc\spath: .+\n
|
||||||
|
RUBY_PLATFORM: .+
|
||||||
}x
|
}x
|
||||||
assert_match expected, irb.context.main.irb_info.to_s
|
assert_match expected, irb.context.main.irb_info.to_s
|
||||||
end
|
end
|
||||||
@ -89,6 +91,7 @@ module TestIRB
|
|||||||
Ruby\sversion: .+\n
|
Ruby\sversion: .+\n
|
||||||
IRB\sversion:\sirb .+\n
|
IRB\sversion:\sirb .+\n
|
||||||
InputMethod:\sReidlineInputMethod\swith\sReline\s[^ ]+(?!\sand\s.+)\n
|
InputMethod:\sReidlineInputMethod\swith\sReline\s[^ ]+(?!\sand\s.+)\n
|
||||||
|
RUBY_PLATFORM: .+\n
|
||||||
\z
|
\z
|
||||||
}x
|
}x
|
||||||
assert_match expected, irb.context.main.irb_info.to_s
|
assert_match expected, irb.context.main.irb_info.to_s
|
||||||
@ -115,6 +118,7 @@ module TestIRB
|
|||||||
Ruby\sversion: .+\n
|
Ruby\sversion: .+\n
|
||||||
IRB\sversion:\sirb .+\n
|
IRB\sversion:\sirb .+\n
|
||||||
InputMethod:\sReadlineInputMethod\swith\s(?~.*\sand\s.+)\n
|
InputMethod:\sReadlineInputMethod\swith\s(?~.*\sand\s.+)\n
|
||||||
|
RUBY_PLATFORM: .+\n
|
||||||
\z
|
\z
|
||||||
}x
|
}x
|
||||||
assert_match expected, irb.context.main.irb_info.to_s
|
assert_match expected, irb.context.main.irb_info.to_s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user