📜  ruby 检查是否存在 - Ruby 代码示例

📅  最后修改于: 2022-03-11 15:04:48.379000             🧑  作者: Mango

代码示例1
apple = 1

defined?(apple)
# "local-variable"

defined?(bacon)
# nil