165件ヒット
[1-100件を表示]
(0.154秒)
モジュール
- Kernel (165)
キーワード
-
$ CHILD _ STATUS (11) -
$ INPUT _ LINE _ NUMBER (11) -
$ LAST _ MATCH _ INFO (11) -
$ LAST _ PAREN _ MATCH (11) -
$ LAST _ READ _ LINE (11) -
$ LOAD _ PATH (11) -
$ MATCH (11) -
$ NR (11) -
$ POSTMATCH (11) -
$ PREMATCH (11) -
$ archdir (11) -
$ defs (11) -
$ hdrdir (11) -
$ sitearchdir (11) -
$ ~ (11)
検索結果
先頭5件
-
Kernel
$ $ INPUT _ LINE _ NUMBER -> Integer (12313.0) -
$. の別名
...$. の別名
1 e
2 f
3 g
4 h
5 i
# end of a.txt
require "English"
File.foreach(ARGV.at(0)){|line|
# read line
}
p $INPUT_LINE_NUMBER
# end of sample.rb
ruby sample.rb a.txt
#=> 5... -
Kernel
$ $ CHILD _ STATUS -> Process :: Status | nil (12307.0) -
$? の別名
...$? の別名
require "English"
out = `wget https://www.ruby-lang.org/en/about/license.txt -O - 2>/dev/null`
if $CHILD_STATUS.to_i == 0
print "wget success\n"
out.split(/\n/).each { |line|
printf "%s\n", line
}
else
print "wget failed\n"
end... -
Kernel
$ $ hdrdir -> String (12217.0) -
Ruby のヘッダファイル ruby.h が存在するディレクトリです。 通常は $archdir と同じで、"/usr/local/lib/ruby/バージョン/arch" です。
...Ruby のヘッダファイル ruby.h が存在するディレクトリです。
通常は $archdir と同じで、"/usr/local/lib/ruby/バージョン/arch" です。... -
Kernel
$ $ LAST _ MATCH _ INFO -> MatchData | nil (12201.0) -
$~ の別名
...名
require "English"
str = "<a href=https://www.ruby-lang.org/en/about/license.txt>license</a>"
if /<a href=(.+?)>/ =~ str
p $LAST_MATCH_INFO[0] #=> "<a href=https://www.ruby-lang.org/en/about/license.txt>"
p $LAST_MATCH_INFO[1] #=> "https://www.ruby-lang.org/en/about/license.txt"......p $LAST_MATCH_INFO[2] #=> nil
end... -
Kernel
$ $ archdir -> String (12201.0) -
マシン固有のライブラリを置くディレクトリです。 通常は "/usr/local/lib/ruby/バージョン/arch" です。
...マシン固有のライブラリを置くディレクトリです。
通常は "/usr/local/lib/ruby/バージョン/arch" です。... -
Kernel
$ $ sitearchdir -> String (12201.0) -
サイト固有でかつマシン固有のライブラリを置くディレクトリです。 通常は "/usr/local/lib/ruby/site_ruby/バージョン/arch" です。
...サイト固有でかつマシン固有のライブラリを置くディレクトリです。
通常は "/usr/local/lib/ruby/site_ruby/バージョン/arch" です。... -
Kernel
$ $ LAST _ READ _ LINE -> String | nil (6225.0) -
$_ の別名
...$_ の別名
1 e
2 f
3 g
4 h
5 i
# end of a.txt
ruby -rEnglish -ne'p $LAST_READ_LINE' a.txt
#=>
"1 e\n"
"2 f\n"
"3 g\n"
"4 h\n"
"5 i\n"... -
Kernel
$ $ LOAD _ PATH -> [String] (6220.0) -
Rubyライブラリをロードするときの検索パスです。
...す。
Kernel.#load や Kernel.#require
がファイルをロードする時に検索するディレクトリのリストを含む配列です。
起動時にはコマンドラインオプション -I で指定したディレクトリ、
環境変数 RUBYLIB の値、
コンパイル時に指定......に典型的な UNIX システム上でのロードパスを示します。
-I で指定したパス
環境変数 RUBYLIB の値
/usr/local/lib/ruby/site_ruby/VERSION サイト固有、バージョン依存のライブラリ
/usr/local/lib/ruby/site_ruby/VERSION/ARCH サイト固......ラリ
/usr/local/lib/ruby/site_ruby サイト固有ライブラリ
/usr/local/lib/ruby/VERSION 標準ライブラリ
/usr/local/lib/ruby/VERSION/ARCH 標準、システム依存、拡張ライブラリ
上記表中の VERSION は Ruby のバージ... -
Kernel
$ $ LAST _ PAREN _ MATCH -> String | nil (6201.0) -
$+ の別名
...uire "English"
r1 = Regexp.compile("<img src=(http:.+?)>")
r2 = Regexp.compile("<a href=(http|ftp).+?>(.+?)</a>")
while line = DATA.gets
[ r1, r2 ].each {|rep|
rep =~ line
p $+
}
end
__END__
<tr> <td><img src=http://localhost/a.jpg></td> <td>ikkou</td> <td><a href=h......ttp://localhost/link.html>link</a></td> </tr>
#enf of sample.rb
$ ruby sample.rb
"http://localhost/a.jpg"
"link"... -
Kernel
$ $ MATCH -> String | nil (6201.0) -
$& の別名
...$& の別名
require "English"
str = 'hoge,foo,bar,hee,hoo'
/(foo|bar)/ =~ str
p $MATCH #=> "foo"...