別のキーワード
種類
- インスタンスメソッド (108)
- 文書 (50)
- ライブラリ (48)
- 特異メソッド (42)
ライブラリ
- bigdecimal (12)
- csv (36)
-
irb
/ inspector (24) - matrix (12)
- pp (4)
- set (14)
- socket (12)
- strscan (12)
- thwait (24)
クラス
- Addrinfo (12)
- BigDecimal (12)
- CSV (12)
-
CSV
:: Row (12) -
CSV
:: Table (12) -
IRB
:: Inspector (12) - Matrix (12)
- Object (4)
- Set (14)
- StringScanner (12)
- ThreadsWait (24)
モジュール
- IRB (12)
キーワード
- Inspector (12)
-
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 7 . 0 (6) -
all
_ waits (18) - cgi (12)
-
def
_ inspector (12) -
drb
/ gw (12) -
inspect
_ sockaddr (12) - irb (12)
-
irb
/ completion (12) - new (6)
-
pretty
_ print (4) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
to
_ s (5)
検索結果
先頭5件
-
IRB
. Inspector(inspect , init = nil) -> IRB :: Inspector (6325.0) -
IRB::Inspector オブジェクトを生成します。
...IRB::Inspector オブジェクトを生成します。
@param inspect 実行結果の出力のための手続きオブジェクトを指定します。
@param init inspect_mode の初期化のための手続きオブジェクトを指定します。
あらかじめ require が必要......な場合などに、proc { require "foo" }
といった指定を行います。... -
Addrinfo
# inspect _ sockaddr -> String (6125.0) -
アドレスやポート番号などの情報を人間に読める形の文字列で返します。
...などの情報を人間に読める形の文字列で返します。
require 'socket'
Addrinfo.tcp("localhost", 80).inspect_sockaddr #=> "127.0.0.1:80"
Addrinfo.tcp("ip6-localhost", 80).inspect_sockaddr #=> "[::1]:80"
Addrinfo.unix("/tmp/sock").inspect_sockaddr #=> "/tmp/sock"... -
Set
# to _ s -> String (3013.0) -
人間の読みやすい形に表現した文字列を返します。
...人間の読みやすい形に表現した文字列を返します。
//emlist[][ruby]{
require 'set'
puts Set.new(['element1', 'element2']).inspect
# => #<Set: {"element1", "element2"}>
//}... -
irb (120.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...示する (デフォルト)
--noecho 実行結果を表示しない
--inspect 結果出力にinspectを用いる (bc モード以外ではデフォルト)
--noinspect 結果出力にinspectを用いない
--readline readlineライブラリを利用する
--nor......= nil
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY_FILE] = nil
IRB.conf[:IGNORE_EOF] = true
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:INSPECT_MODE] = nil
IRB.conf[:IRB_NAME] = "irb"
IRB.conf[:IRB_RC] = nil
IRB.conf[:MATH_MODE] = false
IRB.conf[:PROMPT] = {....}
IRB.conf[:PROMP......で一行ずつ評価されます。
: irb_require(path)
Ruby の require の irb 版です。
ファイル path を現在の irb インタプリタ上で実行します。
path に Ruby スクリプトを指定した場合は、Kernel.#require と異な
り、path の内容を irb で一......実行結果を表示する (デフォルト)
--noecho 実行結果を表示しない
--inspect 結果出力にinspectを用いる
--noinspect 結果出力にinspectを用いない
--readline readlineライブラリを利用する
--noreadline readline......= nil
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY_FILE] = nil
IRB.conf[:IGNORE_EOF] = true
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:INSPECT_MODE] = nil
IRB.conf[:IRB_NAME] = "irb"
IRB.conf[:IRB_RC] = nil
IRB.conf[:PROMPT] = {....}
IRB.conf[:PROMPT_MODE] = :DEFAULT
IRB.conf[:... -
ruby 1
. 6 feature (96.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...; make sure
ruby 1.6.7 (2002-05-04) [i586-linux]
"\\t"
nil
: 2002-04-20: Regexp#inspect
/x フラグ付きの正規表現オブジェクトの inspect が改行を \n に変換して
いました。((<ruby-bugs-ja:PR#225>))
p /a
b/x......uby-bugs-ja:PR#223>))
trap(:TERM, "EXIT")
END{
puts "exit"
}
Thread.start { Thread.stop }
sleep
: 2002-04-17: Regexp#inspect
((<ruby-bugs-ja:PR#222>))
p %r{\/}
=> ruby 1.6.7 (2002-03-01) [i586-linux]
/\\//
=> ruby 1.6.7 (2002-05-04) [i586-linux]......張ライブラリに対して autoload が効いていませんでした。((<ruby-dev:16379>))
autoload :Fcntl, "fcntl"
require "fcntl"
=> -:2:in `require': uninitialized constant Fcntl (NameError)
from -:2
ruby 1.6.7 (2002-03-01) [i586-linux]
=> ruby 1.6.7 (2... -
ruby 1
. 8 . 4 feature (90.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...-:1: empty symbol literal
: Symbol [bug]
#Sat Oct 22 13:26:57 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * object.c (sym_inspect), parse.y (parser_yylex, rb_symname_p): check
# if valid as a symbol name more strictly. [ruby-dev:27478]
#
# * test/ruby/test_sym......2) Symbol#inspect sometimes returns invalid symbol representations:
puts :"!".inspect
puts :"=".inspect
puts :"0".inspect
puts :"$1".inspect
puts :"@1".inspect
puts :"@@1".inspect
puts :"@".inspect
p......) の IP
オブジェクトがデフォルトの IP オブジェクト (デフォルトのスレッドグルー
プに属するもの.require 'multi-tk' の際に生成される) であるか,操作し
ようとしている IP オブジェクトが自らの直接の slave IP であ... -
cgi (72.0)
-
CGI プログラムの支援ライブラリです。
...Gateway Interface (CGI) Version 1.1
* https://www.w3.org/CGI/
=== 使用例
==== フォームフィールドの値を得る
//emlist[][ruby]{
require "cgi"
cgi = CGI.new
values = cgi['field_name'] # <== 'field_name' の配列
# 'field_name' が指定されていなかったら、 ""を返す......の値をハッシュとして得る
フォームの値をハッシュとして得るには CGI#params を使います。
//emlist[例][ruby]{
require "cgi"
cgi = CGI.new
params = cgi.params
//}
また CGI#params は毎回同じ Hash オブジェクトを返すので
以下のような使いか......cgi.br +
cgi.submit
end +
cgi.pre() do
CGI.escapeHTML(
"params: " + cgi.params.inspect + "\n" +
"cookies: " + cgi.cookies.inspect + "\n" +
ENV.collect() do |key, value|
key + " --> " + value + "\n"
end.join("")... -
drb
/ gw (54.0) -
drb 通信を中継するゲートウェイ(DRb::GW)と、 中継に必要なオブジェクト識別子変換クラス(DRb::GWIdConv)、 および DRb::DRbObject への拡張が含まれています。
...oo.rb
require 'drb/drb'
class Foo
include DRbUndumped
def initialize(name, peer=nil)
@name = name
@peer = peer
end
def ping(obj)
puts "#{@name}: ping: #{obj.inspect}"
@peer.ping(self) if @peer
end
end
gw_b.rb
require 'drb/drb'
require 'drb......s2.thread.join
gw_a.rb
require 'drb/unix'
require_relative 'foo'
obj = Foo.new('a')
DRb.start_service("drbunix:/tmp/gw_a", obj)
robj = DRbObject.new_with_uri('drbunix:/tmp/gw_b_a')
robj[:a] = obj
DRb.thread.join
gw_c.rb
require 'drb/unix'
require_relative 'foo'
foo... -
NEWS for Ruby 2
. 7 . 0 (30.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...以前のlazyではないEnumerator#with_indexのデフォルト実装から
lazyになりました。7877
//emlist[Enumerator.produce][ruby]{
require "date"
dates = Enumerator.produce(Date.today, &:succ) #=> infinite sequence of dates
dates.detect(&:tuesday?) #=> next Tuesday
//}
//emlist[Enume......4] #=> 0b0011
0b01001100[2..5] #=> 0b0011
0b01001100[2...6] #=> 0b0011
# ^^^^
//}
* Method
* 変更されたメソッド
* Method#inspectで出てくる情報が増えました。 14145
* Module
* 新規メソッド
* 定数が定義された場所を取得するModule#......* Time#ceilが追加されました。 15772
* Time#floorが追加されました。 15653
* 変更されたメソッド
* Time#inspectがTime#to_sから分離されて、秒未満も
含まれるようになりました。 15958
* UnboundMethod
* 新規メソッド... -
irb
/ completion (30.0) -
irb の completion 機能を提供するライブラリです。
...提供するライブラリです。
=== 使い方
$ irb -r irb/completion
とするか, ~/.irbrc 中に
require "irb/completion"
を入れてください.
irb実行中に require "irb/completion" してもよいです.
irb 実行中に [Tab] を押すとコンプレーションします......完します.
irb(main):001:0> in
in inspect instance_eval
include install_alias_method instance_of?
initialize install_aliases instance_variables
irb(main):001:0> inspect
"main"
irb(main):002:0> foo = Object.new
#......foo.hash foo.public_methods
foo.=~ foo.id foo.respond_to?
foo.__id__ foo.inspect foo.send
foo.__send__ foo.instance_eval foo.singleton_methods
foo.class foo.instance_of? fo...