14件ヒット
[1-14件を表示]
(0.042秒)
別のキーワード
検索結果
先頭2件
-
Rubyの起動 (15057.0)
-
Rubyの起動 * cmd_option * shebang
...Rubyの起動
* cmd_option
* shebang
Rubyインタプリタの起動は以下の書式のコマンドラインにより行います。
ruby [ option ...] [ -- ] [ programfile ] [ argument ...]
ここで、option は後述のcmd_option
のいずれかを指定します。-- は、オプシ......指定します。
//emlist{
# test.rb
def f6 = raise
def f5 = f6
def f4 = f5
def f3 = f4
def f2 = f3
def f1 = f2
f1
//}
//emlist{
% ruby --backtrace-limit=3 test.rb
test.rb:1:in `f6': unhandled exception
from test.rb:2:in `f5'
from test.rb:3:in `f4'
from test.rb:4:in `f3'
... 3 levels.........cho matz | ruby -p -e '$_.tr! "a-z", "A-Z"'
MATZ
//}
: -r feature
スクリプト実行前に feature で指定されるライブラリを
Kernel.#require します。
`-n'オプション、`-p'オプションとともに使う時に特に有効です。
: -s
スクリプト名に続... -
ruby 1
. 6 feature (48.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...: 2002-03-08 class variable
((<ruby-talk:35122>))
class C
class << self
def test
@@cv = 5
p @@cv
end
end
test
end
=> -:5:in `test': uninitialized class variable @@cv in C (NameError)
from -:9
ruby 1.6.7 (2002......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......=> ruby 1.6.4 (2001-06-04) [i586-linux]
false
=> ruby 1.6.4 (2001-08-06) [i586-linux]
true
: ruby -x
オプション ((<Rubyの起動/-x[directory]>)) を指定したときにスクリ
プトを実行せずに終了することがありました。((<ruby-dev:13752>))
: at...