本文簡要介紹ruby語言中 FrozenError.new
的用法。
用法
new(msg=nil, receiver: nil) → frozen_error
構造一個新的 FrozenError
異常。如果給定 receiver
參數,隨後可以使用 FrozenError#receiver
方法檢查。
a = [].freeze
raise FrozenError.new("can't modify frozen array", receiver: a)
相關用法
- Ruby FrozenError類用法及代碼示例
- Ruby Float arg()用法及代碼示例
- Ruby File.identical?用法及代碼示例
- Ruby Fiber.schedule用法及代碼示例
- Ruby Float fdiv()用法及代碼示例
- Ruby Float quo()用法及代碼示例
- Ruby Float angle()用法及代碼示例
- Ruby FileUtils.mkdir用法及代碼示例
- Ruby Float divmod()用法及代碼示例
- Ruby Float.self - other用法及代碼示例
- Ruby Float.rationalize用法及代碼示例
- Ruby Float.truncate用法及代碼示例
- Ruby FileUtils.compare_file用法及代碼示例
- Ruby FileUtils.options_of用法及代碼示例
- Ruby File.dirname用法及代碼示例
- Ruby Formatter.random_bytes用法及代碼示例
- Ruby Float prev_float()用法及代碼示例
- Ruby FileUtils.ln_s用法及代碼示例
- Ruby Float round()用法及代碼示例
- Ruby Float denominator()用法及代碼示例
- Ruby Float numerator()用法及代碼示例
- Ruby Float absolute()用法及代碼示例
- Ruby Float to_i()用法及代碼示例
- Ruby Fiddle.dlwrap用法及代碼示例
- Ruby Float nan?()用法及代碼示例
注:本文由純淨天空篩選整理自ruby-lang.org大神的英文原創作品 FrozenError.new。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。