るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. matrix i

検索結果

<< 1 2 3 ... > >>

OpenSSL::Buffering#puts(*objs) -> nil (24207.0)

各オブジェクトを出力し、それぞれの後に改行を出力します。

...各オブジェクトを出力し、それぞれの後に改行を出力します。

I
O#puts と同様です。

@param objs 出力したいオブジェクト...

RubyVM::InstructionSequence.compile_file(file, options = nil) -> RubyVM::InstructionSequence (15706.0)

引数 file で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。

...file で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。

RubyVM::InstructionSequence.compile とは異なり、file、path などの
メタデータは自動的に取得します。

@param file...
...tions コンパイル時のオプションを true、false、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。

# /tmp/hello.rb
puts
"Hello, world!"

# i...
...rb
RubyVM::InstructionSequence.compile_file("/tmp/hello.rb")
# => <RubyVM::InstructionSequence:<main>@/tmp/hello.rb>

@see RubyVM::InstructionSequence.compile...

TracePoint#instruction_sequence -> RubyVM::InstructionSequence (15506.0)

script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。

...script_compiledイベント発生時にコンパイルされた
RubyVM::InstructionSequenceインスタンスを返します。

//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval...
...("puts 'hello'")
end
//}

@raise RuntimeError :script_compiled イベントのための
イベントフックの外側で実行した場合に発生します。...

Encoding::Converter#insert_output(string) -> nil (15324.0)

変換器内のバッファに文字列を挿入します。 バッファに保持された文字列は、次の変換時の変換結果と一緒に返されます。

...aram string 挿入する文字列

//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "iso-8859-1")
src = "HIRAGANA LETTER A is \u{3042}."
dst = ""
p ec.primitive_convert(src, dst) #=> :undefined_conversion
puts
"[#{dst.dump}, #{src.dump}]" #=> ["HIRAGANA LETTER A is ", "."]
ec.insert_outp...
...r>")
p ec.primitive_convert(src, dst) #=> :finished
puts
"[#{dst.dump}, #{src.dump}]" #=> ["HIRAGANA LETTER A is <err>.", ""]

ec = Encoding::Converter.new("utf-8", "iso-2022-jp")
src = "\u{306F 3041 3068 2661 3002}" # U+2661 is not representable in iso-2022-jp
dst = ""
p ec.primitive_convert(s...
...rc, dst) #=> :undefined_conversion
puts
"[#{dst.dump}, #{src.dump}]" #=> ["\e$B$O$!$H".force_encoding("ISO-2022-JP"), "\xE3\ x80\x82"]
ec.insert_output "?" # state change required to output "?".
p ec.primitive_convert(src, dst) #=> :finished
puts
"[#{dst.dump}, #{src.dump}...

String#inspect -> String (15312.0)

文字列オブジェクトの内容を、出力したときに人間が読みやすいような適当な形式に変換します。 変換された文字列は印字可能な文字のみによって構成されます

...ために用意されています。
永続化などの目的で文字列をダンプしたいときは、
String#dump を使うべきです。

//emlist[例][ruby]{
# p ではないことに注意
puts
"string".inspect # => "string"
puts
"\t\r\n".inspect # => "\t\r\n"
//}

@see String#dump...

絞り込み条件を変える

WIN32OLE_TYPE#inspect -> String (15306.0)

selfを説明的な文字列で表現します。

...ます。

@return "#<WIN32OLE_TYPE"とWIN32OLE_TYPE#to_sの結果を「:」で結合
し、「>」で閉じた文字列を返します。

x = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
puts
x.inspect #=> #<WIN32OLE_TYPE:Worksheet>

@see WIN32OLE_TYPE#to_s...

MatchData#inspect -> String (12324.0)

self の内容を人間に読みやすい文字列にして返します。

...//emlist[例][ruby]{
puts
/.$/.match("foo").inspect
# => #<MatchData "o">

puts
/(.)(.)(.)/.match("foo").inspect
# => #<MatchData "foo" 1:"f" 2:"o" 3:"o">

puts
/(.)(.)?(.)/.match("fo").inspect
# => #<MatchData "fo" 1:"f" 2:nil 3:"o">

puts
/(?<foo>.)(?<bar>.)(?<baz>.)/.match("hoge").inspect
# =>...

RubyVM::AbstractSyntaxTree::Node#inspect -> String (12306.0)

self のデバッグ用の情報を含んだ文字列を返します。

...self のデバッグ用の情報を含んだ文字列を返します。

//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
puts
node.inspect
# => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:5>
//}...

Set#inspect -> String (12306.0)

人間の読みやすい形に表現した文字列を返します。

...人間の読みやすい形に表現した文字列を返します。

//emlist[][ruby]{
require 'set'
puts
Set.new(['element1', 'element2']).inspect
# => #<Set: {"element1", "element2"}>
//}...

Thread::Backtrace::Location#inspect -> String (12306.0)

Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。

...ace::Location#to_s の結果を人間が読みやすいような文
字列に変換したオブジェクトを返します。

//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |...
...call|
puts call.inspect
end

# => "path/to/foo.rb:5:in `initialize'"
# "path/to/foo.rb:9:in `new'"
# "path/to/foo.rb:9:in `<main>'"
//}...

絞り込み条件を変える

<< 1 2 3 ... > >>