るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.238秒)

別のキーワード

  1. rexml/document new
  2. rexml/document write
  3. rexml/document to_s
  4. rexml/document node_type
  5. rexml/document clone

検索結果

クラス/メソッドの定義 (15068.0)

クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined

...クラス/メソッドの定義
* クラス/メソッドの定義:
* class
* singleton_class
* module
* method
* operator
* nest_method
* eval_method
* singleton_method
* class_method
* limit
* 定義に関する操作:
* alias
* undef
* d...
...Y = 0
WRONLY = 1
end
include Constants
end

File.open("foo", File::RDONLY)

# あるいは

include File::Constants
File.open("foo", RDONLY)

# 上記はあくまでも例である。実際の File.open ではより簡便な
# File.open("foo", "r") という形式が使われる
//}

クラ...
...タを定義する方法の一つです。イテレータを定義する代表的な方法は
yield を呼び出すことです。
他に Proc.new/Kernel.#proc を使う方法などもあります。
ブロックが与えられなかった場合のブロック引数の値はnilです。

//emlist[...

ruby 1.6 feature (61.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...dev:17155>))

open
("|-","r+") {|f|
if f
f.dup.close_write
else
sleep 1
end
}

=> ruby 1.6.7 (2002-03-01) [i586-linux]
-:3:in `close_write': closing non-duplex IO for writing (IOError)
from -:3
from -:1:in `open'...
...ルシステムでこ
のような場合があります)が File#read などで読めないバグが修正されまし
た。

p File.open("/proc/#$$/cmdline").read

=> ruby 1.6.7 (2002-03-01) [i586-linux]
""

=> ruby 1.6.7 (2002-03-29) [i586-linux]...
...def initialize(obj) @obj = obj end
def []=() @obj = obj end
def []() @obj end
end
module Kernel
def _ptr() Ptr.new(self) end
end

def foo(int)
int[] += 1
end
x = 1._ptr...