るりまサーチ

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

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

検索結果

<< 1 2 3 ... > >>

StringScanner#rest -> String (18153.0)

文字列の残り (rest) を返します。 具体的には、スキャンポインタが指す位置からの文字列を返します。

...文字列の残り (rest) を返します。
具体的には、スキャンポインタが指す位置からの文字列を返します。

スキャンポインタが文字列の末尾を指していたら空文字列 ("") を返します。

//emlist[例][ruby]{
require 'strscan'

s = StringScanne...
...r.new('test string')
s.rest # => "test string"
s.scan(/\w+/) # => "test"
s.rest # => " string"
s.scan(/\s+/) # => " "
s.rest # => "string"
s.scan(/\w+/) # => "string"
s.rest # => ""
//}...

ruby 1.8.2 feature (7252.0)

ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。

...ruby 1.8.2 feature
ruby
1.8.2 での ruby 1.8.1 からの変更点です。

掲載方針

*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。...
...以下は各変更点に付けるべきタグです。

*カテゴリ
* [ruby]: ruby インタプリタの変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
*レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更された...
.../magazine.rubyist.net/articles/0002/0002-RubyCore.html>))
* tk の変更点は
((<URL:https://magazine.rubyist.net/articles/0003/0003-RubyTkMovement.html>))
を参照して下さい。
* soap, wsdl の変更点は
((<URL:http://rrr.jin.gr.jp/projects/soap4r/wiki/Changes-ruby181_ruby182>))...

NEWS for Ruby 3.0.0 (6390.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...NEWS for Ruby 3.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs
accepting a single rest argument and no keywords.
16166

//emlist[][ruby]{...
...It is a type definition
language for Ruby programs.
* {TypeProf}[rdoc-label:label-TypeProf] is experimentally bundled. It is a
type analysis tool for Ruby programs.
* Deprecation warnings are no longer shown by default (since Ruby 2.7.2).
Turn them on with `-W:deprecated...

RubyVM::AbstractSyntaxTree.of(proc) -> RubyVM::AbstractSyntaxTree::Node (6218.0)

引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。

...す。

//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))

def hello
puts "hello, world"
end

pp RubyVM::AbstractSyntaxT...
...pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_init: nil
# rest: nil
# kw: nil
# kwrest: nil
# block: nil)
# body:
# (FCALL@6:2-6:21 :puts (LIST@6:7-6:21 (STR@6:7-6:21 "hello, world") nil)))
//}...

RubyVM::AbstractSyntaxTree.of(proc, keep_script_lines: false, error_tolerant: false, keep_tokens: false) -> RubyVM::AbstractSyntaxTree::Node (6218.0)

引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。

...す。

//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))

def hello
puts "hello, world"
end

pp RubyVM::AbstractSyntaxT...
...pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_init: nil
# rest: nil
# kw: nil
# kwrest: nil
# block: nil)
# body:
# (FCALL@6:2-6:21 :puts (LIST@6:7-6:21 (STR@6:7-6:21 "hello, world") nil)))
//}...

絞り込み条件を変える

StringScanner#rest_size -> Integer (6147.0)

文字列の残りの長さを返します。 stringscanner.rest.size と同じです。

...canner.rest.size と同じです。

StringScanner#restsize は将来のバージョンで削除される予定です。
代わりにStringScanner#rest_size を使ってください。

//emlist[例][ruby]{
require 'strscan'

s = StringScanner.new('test string')
p s.rest_size # => 11
p s.rest.size #...

StringScanner#restsize -> Integer (6147.0)

文字列の残りの長さを返します。 stringscanner.rest.size と同じです。

...canner.rest.size と同じです。

StringScanner#restsize は将来のバージョンで削除される予定です。
代わりにStringScanner#rest_size を使ってください。

//emlist[例][ruby]{
require 'strscan'

s = StringScanner.new('test string')
p s.rest_size # => 11
p s.rest.size #...

StringScanner#rest? -> bool (6131.0)

文字列が残っているならば trueを、 残っていないならば false を返します。

...します。

StringScanner#rest? は将来のバージョンで削除される予定です。
代わりに StringScanner#eos? を使ってください。

//emlist[例][ruby]{
require 'strscan'

s = StringScanner.new('test string')
p s.eos? # => false
p s.rest? # => true
s.scan(/\w+/)...
...s.scan(/\s+/)
s.scan(/\w+/)
p s.eos? # => true
p s.rest? # => false
//}...

NEWS for Ruby 2.2.0 (6084.0)

NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...NEWS for Ruby 2.2.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...トは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.1.0 以降の変更

=== 言語仕様の変更

* nil/true/false
* nil/true/false はフリーズされました 8923

* Hash リテラル
* 後ろにコロンのあるシンボルをキー...
...を起動するようなメソッドは [:out, :err]
からリダイレクトされるファイルを書き込みモードで開きます。Ruby 2.2以前は読み込みモードで開いていました。

=== 標準添付ライブラリの更新 (優れたもののみ)

* continuation...

RubyVM::InstructionSequence.disasm(body) -> String (6006.0)

引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。

...
Ruby
VM::InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。

@param body Proc、Method オブジェクトを指定します。

例1:Proc オブジェクトを指定した場合

# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts RubyVM::I...
...nstructionSequence.disasm(p)

出力:

== disasm: <RubyVM::InstructionSequence:block in <main>@/tmp/proc.rb>===
== catch table
| catch type: redo st: 0000 ed: 0012 sp: 0000 cont: 0000
| catch type: next st: 0000 ed: 0012 sp: 0000 cont: 0012
|--------------------------------------------...
...----------------------------
local table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] s1)
[ 2] num
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 dup
0009 setl...

絞り込み条件を変える

RubyVM::InstructionSequence.disassemble(body) -> String (6006.0)

引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。

...
Ruby
VM::InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。

@param body Proc、Method オブジェクトを指定します。

例1:Proc オブジェクトを指定した場合

# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts RubyVM::I...
...nstructionSequence.disasm(p)

出力:

== disasm: <RubyVM::InstructionSequence:block in <main>@/tmp/proc.rb>===
== catch table
| catch type: redo st: 0000 ed: 0012 sp: 0000 cont: 0000
| catch type: next st: 0000 ed: 0012 sp: 0000 cont: 0012
|--------------------------------------------...
...----------------------------
local table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] s1)
[ 2] num
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 dup
0009 setl...
<< 1 2 3 ... > >>