るりまサーチ

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

別のキーワード

  1. _builtin <
  2. bigdecimal <
  3. float <
  4. module <
  5. complex <

ライブラリ

キーワード

検索結果

<< 1 2 > >>

Kernel$$< -> IO (6101.0)

すべての引数または標準入力で構成される仮想ファイルです。 定数 Object::ARGF の別名です。

すべての引数または標準入力で構成される仮想ファイルです。
定数 Object::ARGF の別名です。

この変数はグローバルスコープ、読み取り専用です。

Kernel$$LAST_PAREN_MATCH -> String | nil (25.0)

$+ の別名

...("<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=http://localhost/link.html>link</a></t...
...d> </tr>
#enf of sample.rb

$ ruby sample.rb
"http://localhost/a.jpg"
"link"...

Kernel.#print(*arg) -> nil (19.0)

引数を順に標準出力 $stdout に出力します。引数が与えられない時には変数 $_ の値を出力します。

...た場合に発生します。

//emlist[例][ruby]{
print "Hello, world!"
print "Regexp is",/ant/
print nil
print "\n"
#=> Hello, world!Regexp is(?-mix:ant)

$_ = "input"
$, = "<and>"
$\ = "<end>\n"
print
print "AA","BB"
#=> input<end>
#=> AA<and>BB<end>
//}

@see Kernel.#puts,Kernel.#p,IO#print...

Kernel#DelegateClass(superclass) -> object (7.0)

クラス superclass のインスタンスへメソッドを委譲するクラスを定義し、 そのクラスを返します。

...ラスを定義し、
そのクラスを返します。

@param superclass 委譲先となるクラス

例:

//emlist{
require 'delegate'

class ExtArray < DelegateClass(Array)
def initialize
super([])
end
end
a = ExtArray.new
p a.class # => ExtArray
a.push 25
p a # => [25]
//}...

Kernel#try_cpp(src, opt = "", *opts) -> bool (7.0)

C プログラムのソースコード src をプリプロセスします。

...イン引数として渡す値を指定します。

@return 問題なくプリプロセスできたら true を返します。
プリプロセスに失敗したら false を返します。

例:

require 'mkmf'
if try_cpp("#include <stdio.h>")
$stderr.puts "stdio.h exists"
end...

絞り込み条件を変える

Kernel#try_cpp(src, opt = "", *opts) { ... } -> bool (7.0)

C プログラムのソースコード src をプリプロセスします。

...イン引数として渡す値を指定します。

@return 問題なくプリプロセスできたら true を返します。
プリプロセスに失敗したら false を返します。

例:

require 'mkmf'
if try_cpp("#include <stdio.h>")
$stderr.puts "stdio.h exists"
end...

Kernel$$DEFAULT_INPUT -> IO (7.0)

$< の別名

...$< の別名

require "English"
while line = $DEFAULT_INPUT.gets
p line
end
# end of sample.rb

ruby sample.rb < /etc/passwd
# => "hoge:x:500:501::/home/hoge:/bin/bash\n"
......

Kernel$$ERROR_INFO -> Exception | nil (7.0)

$! の別名

...$! の別名

require "English"
class SomethingError < StandardError; end

begin
raise SomethingError
rescue
p $ERROR_INFO.backtrace #=> ["sample.rb:5"]
p $ERROR_INFO.to_s #=> "SomethingError"
end...

Kernel$$ERROR_POSITION -> [String] | nil (7.0)

$@ の別名

...$@ の別名

require "English"
class SomethingError < StandardError; end

begin
raise SomethingError
rescue
p $ERROR_POSITION #=> ["sample.rb:5"]
end...
<< 1 2 > >>