るりまサーチ

最速Rubyリファレンスマニュアル検索!
19件ヒット [1-19件を表示] (0.021秒)
トップページ > クエリ:self[x] > クエリ:chomp[x] > クエリ:warn[x]

別のキーワード

  1. object yield_self
  2. _builtin yield_self
  3. _builtin self
  4. tracepoint self
  5. codeobject document_self

種類

ライブラリ

モジュール

検索結果

Warning.warn(message) -> nil (21143.0)

引数 message を標準エラー出力 $stderr に出力します。

...ある $stderr への出力ができます。

//emlist[][ruby]{
warn
"hoge" # => hoge

module Warning
# 警告メッセージの末尾に !!! を追加する
def self.warn(message)
super(message.chomp + "!!!\n")
end
end

warn
"hoge" # => hoge!!!
//}

@param message 出力するオブジ...
...ェクトを指定します。

@param category 警告のカテゴリを指定します。サポートされている category については Warning.[] を参照してください。

@see Kernel.#warn, Warning#warn...

Warning.warn(message, category: nil) -> nil (21137.0)

引数 message を標準エラー出力 $stderr に出力します。

...st[][ruby]{
module Warning
# 警告メッセージに category を表示し、message 末尾に !!! を追加する
def self.warn(message, category: nil)
super("#{category} warning : #{message.chomp}!!!\n")
end
end

warn
("hoge", category: :deprecated)
# => deprecated warning : hoge!!!
//}...
...@param message 出力するオブジェクトを指定します。

@param category 警告のカテゴリを指定します。サポートされている category については Warning.[] を参照してください。

@see Kernel.#warn, Warning#warn...

1.6.8から1.8.0への変更点(まとめ) (156.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...ました
((<ruby-bugs-ja:313>))。なんだかよくわかりません(^^;

class << Object
p [self.id, self]
class << self
p [self.id, self]
end
end
=> ruby 1.6.7 (2002-03-01) [i586-linux]
[537771634, Class]...
...た。

# # derived from sample/test.rb
# a = *[]; p a # special case
# def f; yield; end; f {|a| p a} # add (warning)
# def r; return; end; a = r(); p a
# a = nil; p a
# def f; yield nil; end; f {|a| p a}
# def r; return nil; end; a = r(); p a
#...
...1: warning: flags and encoding ignored
ruby 1.8.0 (2003-02-16) [i586-linux]
//is

=== String

: ((<String#chomp|String/chomp>)) [change]
: ((<String#chomp!|String/chomp!>)) [change]
: ((<組み込み関数/chomp>)) [change]
: ((<組み込み関数/chomp!>...