Ruby 命令行:未定义的局部变量或方法
我得到了以下代码:Ruby 命令行:未定义的局部变量或方法,ruby,Ruby,我得到了以下代码: require 'base64' def Decrypt(rsaCipher, encryptedValue) print base64.decode64(encryptedValue) end Decrypt("a", "b") 我在“Decrypt”中得到错误消息:main:Object(namererror)的未定义局部变量或方法“base64”。我做错了什么?即使我包含了base64库,为什么Ruby没有检测到它?它应该是base64,而不是base64。它
require 'base64'
def Decrypt(rsaCipher, encryptedValue)
print base64.decode64(encryptedValue)
end
Decrypt("a", "b")
我在“Decrypt”中得到错误消息
:main:Object(namererror)
的未定义局部变量或方法“base64”。我做错了什么?即使我包含了base64
库,为什么Ruby没有检测到它?它应该是base64
,而不是base64
。它应该是base64
,而不是base64
。谢谢竞选总统。谢谢逃窜