るりまサーチ

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

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

検索結果

<< 1 2 3 > >>

NEWS for Ruby 3.0.0 (26072.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...no longer frozen when
`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static analysis}[rdoc-label:label-Static+ana...
...s: Read ENV names and values as UTF-8 encoded Strings 12650
* Encoding
* Added new encoding IBM720. 16233
* Changed default for Encoding.default_external to UTF-8 on Windows 16604
* Fiber
* Fiber.new(blocking: true/false) allows you to create non-blocking execution contexts. 16786...

ruby 1.6 feature (23276.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...00019>))

: 2002-09-11: Queue#((<Queue/pop>))

Queue#pop に競合状態の問題がありました ((<ruby-dev:17223>))

: 2002-09-11: SizedQueue.new

引数に 0 以下を受けつけるバグが修正されました。

: 2002-09-05: ((<リテラル/式展開>))

stable snapshot で、一...
...ません。コメントの扱いなどは、1.7
とは異なります。(((<ruby 1.7 feature>)) の 2002-06-24 も参照)

p "#{ "" # comment }"
=> ruby 1.6.8 (2002-10-04) [i586-linux]
""
=> -:1: parse error
ruby 1.7.3 (2002-10-04) [i586-linux]

: Si...
...フォルト値 (((<Hash/default>))) も == で等しい
ときに等しいとみなされるようになりました。

p Hash.new("foo") == Hash.new("bar")

=> ruby 1.6.7 (2002-03-01) [i586-linux]
true
=> ruby 1.6.7 (2002-08-21) [i586-linux]
false...

REXML::Comment.new(comment, parent = nil) -> REXML::Comment (21339.0)

Comment オブジェクトを生成します。

...
Comment
オブジェクトを生成します。

引数に REXML::Comment オブジェクトを渡すとその内容が複製されます
(親ノードの情報は複製されません)。

@param string コメント文字列
@param comment REXML::Comment オブジェクト
@param parent 親ノー...

REXML::Comment.new(string, parent = nil) -> REXML::Comment (21239.0)

Comment オブジェクトを生成します。

...
Comment
オブジェクトを生成します。

引数に REXML::Comment オブジェクトを渡すとその内容が複製されます
(親ノードの情報は複製されません)。

@param string コメント文字列
@param comment REXML::Comment オブジェクト
@param parent 親ノー...

RDoc::Context::Section.new(parent, title, comment) -> RDoc::Context::Section (18208.0)

自身を初期化します。

...します。

@param parent RDoc::Context オブジェクトを指定します。

@param title section のタイトルを文字列で指定します。

@param comment section のコメントを文字列で指定します。

また、section のシーケンス番号を新しく作成します。...

絞り込み条件を変える

REXML::Comment (18006.0)

XML コメントを表すクラス。

...クラス。

コメントとは <!-- と --> で挟まれたテキストです。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<!-- xx -->
<root>
<!-- yy -->
text
<!-- zz -->
</root>
EOS

doc[0].string # => " xx "
doc.root[1].string # => " yy "
doc.root[3].string # =...

正規表現 (88.0)

正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references

...har
* anychar
* string
* str
* quantifier
* capture
* grouping
* subexp
* selector
* anchor
* cond
* option
* encoding
* comment
* free_format_mode
* absenceop
* list
* specialvar
* references


正規表現(regular expression)は文字列のパターンを記述...
...列中のどの場所であるかを知ることができます。

//emlist[][ruby]{
/pat/
%r{pat}
//}

などの正規表現リテラルや Regexp.new などで正規表現
オブジェクトを得ることができます。


===[a:metachar] メタ文字列とリテラル、メタ文字とエス...
...\t 水平タブ horizontal tab (0x09)
\v 垂直タブ vertical tab (0x0B)
\n 改行 newline (0x0A)
\r 復帰 return (0x0D)
\b バックスペース back space (0x08...

rexml/parsers/streamparser (78.0)

ストリーム式の XML パーサ。

...ソッドをオーバーライドしたクラスのオブジェクトを
コールバックオブジェクトとして REXML::Parsers::StreamParser.new
に渡します。

REXML::Parsers::StreamParser#parse を呼び出すと
パースが開始しその結果によってコールバックが呼び...
...ents
end

xml = <<EOS
<members>
<member name="apple" color="red">
<comment>comment here</comment>
</member>
<member name="banana" color="yellow"/>
</members>
EOS
listener = Listener.new
REXML::Parsers::StreamParser.new(xml, listener).parse
listener.events
# => ["tag_start[members]",
#...
..."text[\n ]",
# "tag_start[member]",
# "text[\n ]",
# "tag_start[comment]",
# "text[comment here]",
# "text[\n ]",
# "text[\n ]",
# "tag_start[member]",
# "text[\n]",
# "text[\n]"]
//}

=== コールバック仕様確認サンプル
以下の例では様々...

rexml/parsers/sax2parser (36.0)

SAX2 と同等の API を持つストリーム式の XML パーサ。

...よりは高機能です。

//emlist[][ruby]{
require 'rexml/parsers/sax2parser'
require 'rexml/sax2listener'

parser = REXML::Parsers::SAX2Parser.new(<<XML)
<root n="0">
<a n="1">111</a>
<b n="2">222</b>
<a n="3">333</a>
</root>
XML

elements = []
parser.listen(:start_element){|uri, localnam...
...<!-- comment here--> &bar;
</root>
EOS

class Listener
#include REXML::SAX2Listener
def method_missing(name, *args)
p [name, *args]
end
def respond_to_missing?(name, include_private)
name != :call
end
end

parser = REXML::Parsers::SAX2Parser.new(xml)
parser.listen(Listener.new)
pa...
...nd_element, "http://example.org/default", "a", "a"]
# >> [:progress, 683]
# >> [:characters, "\n &amp;&amp; "]
# >> [:progress, 683]
# >> [:comment, " comment here"]
# >> [:progress, 683]
# >> [:characters, " barbarbarbar\n"]
# >> [:progress, 683]
# >> [:end_element, "http://example.org/default", "...

rexml/parsers/pullparser (30.0)

プル方式の XML パーサ。

...テキストノード
: processing_instruction (ターゲット文字列, 内容文字列 | nil)
XML処理命令(Processing Instruction, PI)
: comment (コメント文字列)
コメント
: start_doctype (ルート要素名, "SYSTEM" | "PUBLIC" | nil, システム識別子 | nil, 公開識別...
...ar="http://example.org/bar"><![CDATA[cdata is here]]>
<a foo:att='1' bar:att='2' att='&lt;'/>
&amp;&amp; <!-- comment here--> &bar;
</root>
EOS

parser = REXML::Parsers::PullParser.new(xml)
while parser.has_next?
p parser.pull
end
# >> xmldecl: ["1.0", "UTF-8", nil]
# >> text: ["\n", "\n"]
# >...
...# >> text: ["\n ", "\n "]
# >> start_element: ["a", {"foo:att"=>"1", "bar:att"=>"2", "att"=>"&lt;"}]
# >> end_element: ["a"]
# >> text: ["\n &amp;&amp; ", "\n && "]
# >> comment: [" comment here"]
# >> text: [" &bar;\n", " barbarbarbar\n"]
# >> end_element: ["root"]
# >> text: ["\n", "\n"]
//}...

絞り込み条件を変える

<< 1 2 3 > >>