るりまサーチ

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

別のキーワード

  1. element undefined
  2. module method_undefined
  3. rexml/document undefined
  4. _builtin method_undefined
  5. _builtin singleton_method_undefined

検索結果

<< 1 2 3 ... > >>

REXML::Element::UNDEFINED -> String (18117.0)

"UNDEFINED" という文字列。

..."UNDEFINED" という文字列。...

BasicObject#singleton_method_undefined(name) -> object (6137.0)

特異メソッドが Module#undef_method または undef により未定義にされた時にインタプリタから呼び出されます。

...るフックには
Module#method_undefined を使います。

@param name 未定義にされたメソッド名が Symbol で渡されます。

//emlist[例][ruby]{
class Foo
def singleton_method_undefined(name)
puts "singleton method \"#{name}\" was undefined"
end
end

obj = Foo.new
def ob...
...foo
end
def obj.bar
end

class << obj
undef_method :foo
end
obj.instance_eval {undef bar}

#=> singleton method "foo" was undefined
# singleton method "bar" was undefined
//}

@see Module#method_undefined,BasicObject#singleton_method_added,BasicObject#singleton_method_removed , d:spec/def#undef...

Module#method_undefined(name) -> () (6131.0)

このモジュールのインスタンスメソッド name が Module#undef_method によって削除されるか、 undef 文により未定義にされると、インタプリタがこのメソッドを呼び出します。

...るには
BasicObject#singleton_method_undefined
を使います。

@param name 削除/未定義にされたメソッド名が Symbol で渡されます。

//emlist[例][ruby]{
class C
def C.method_undefined(name)
puts "method C\##{name} was undefined"
end

def foo
end
def bar
end...
...undef_method :foo
undef bar
end
//}

実行結果:

method C#foo was undefined
method C#bar was undefined...

static VALUE rb_undefined(VALUE obj, ID id, int argc, VALUE *argv, int call_status) (6100.0)

Encoding::UndefinedConversionError (6000.0)

エンコーディング変換後の文字が存在しない場合に発生する例外。

...字を EUC-JP に変換しようとした場合などに発生します。

//emlist[例][ruby]{
"\u2603".encode(Encoding::EUC_JP)
#=> Encoding::UndefinedConversionError: U+2603 from UTF-8 to EUC-JP
//}


変換が多段階でなされ、その途中で例外が生じた場合は、
例外オブジ...
...")
# ISO-8859-1 -> UTF-8 -> EUC-JP
begin
ec.convert("\xa0")
# NO-BREAK SPACE, which is available in UTF-8 but not in EUC-JP.
rescue Encoding::UndefinedConversionError
p $!.source_encoding #=> #<Encoding:UTF-8>
p $!.destination_encoding #=> #<Encoding:EUC-JP>
p $!.sourc...

絞り込み条件を変える

REXML::UndefinedNamespaceException (6000.0)

XMLのパース中に、定義されていない名前空間が現れた場合に発生する 例外です。

XMLのパース中に、定義されていない名前空間が現れた場合に発生する
例外です。

Encoding::UndefinedConversionError#destination_encoding -> Encoding (3000.0)

エラーを発生させた変換の変換先のエンコーディングを Encoding オブジェクトで返します。

...エラーを発生させた変換の変換先のエンコーディングを Encoding
オブジェクトで返します。

@see Encoding::UndefinedConversionError#source_encoding...

Encoding::UndefinedConversionError#destination_encoding_name -> String (3000.0)

エラーを発生させた変換の変換先のエンコーディングを文字列で返します。

...エラーを発生させた変換の変換先のエンコーディングを文字列で返します。

@see Encoding::UndefinedConversionError#destination_encoding...

Encoding::UndefinedConversionError#error_char -> String (3000.0)

エラーを発生させた1文字を文字列で返します。

...エラーを発生させた1文字を文字列で返します。

//emlist[例][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
begin
ec.convert("\u{a0}")
rescue Encoding::UndefinedConversionError
puts $!.error_char.dump #=> "\u{a0}"
end
//}...
<< 1 2 3 ... > >>