キーワード
-
NEWS for Ruby 2
. 5 . 0 (7) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 9 feature (11) - クラス/メソッドの定義 (11)
検索結果
-
ruby 1
. 6 feature (313.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...りました。
p "#{ "" }"
=> ruby 1.6.7 (2002-03-01) [i586-linux]
""
=> -:1: warning: bad substitution in string
ruby 1.6.7 (2002-09-12) [i586-linux]
"#{ }"
=> ruby 1.6.7 (2002-09-25) [i586-linux]
""
これは1.7......ません。1.6に入るかも不明です。-))
: 2002-07-11 String#slice!
範囲外の文字列を指定したときに例外を返す場合がありましたが、常に nil
を返すようになりました。(String#[]やString#slice と同じ結果を返すと
いうことです)......-03-01) [i586-linux]
nil
-:2:in `slice!': index 5 out of string (IndexError)
from -:2
=> ruby 1.6.7 (2002-08-01) [i586-linux]
nil
nil
: 2002-07-05 String#split
最初の引数に nil を指定できるようになりました。... -
ruby 1
. 9 feature (115.0) -
ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。
...け取るようになりました [compat]
: String#unpack("M") で CRLF を単独の LF と同様に無視するようになりました ((<ruby-dev:28601>)) [compat]
* M17N
: 以下、ここでいう「1文字」は 1byte のことです
: String#ord という、1文字の文字列に対......されました
: string[integer] が 1文字の String を返すようになりました
: string.slice(integer) が 1文字の String を返すようになりました
: ?c が 1文字の String を返すようになりました
: sprintf の %c が 1文字の String を受け付けるよ......なりました
: String#[]= が右辺の整数を受け付けなくなりました
: String#chr という先頭の1文字を返すメソッドが追加されました
: IO#getc が 1文字の String を返すようになりました
#: IO#readchar が 1文字の String を返すようにな... -
NEWS for Ruby 2
. 5 . 0 (109.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...onSequence#trace_points を追加
* String
* String#-@ はフリーズされていない文字列の重複を排除します。
互換性のため、既にフリーズされている文字列には何もしません。 13077
* -"literal" (String#-@) は同じオブジェクトを......his much improves the speed of generating documents.
* It also facilitates supporting new syntax in the future.
* Support many new syntaxes of Ruby from the past few years.
* Use "frozen_string_literal: true".
This reduces document generation time by 5%.
* Support d...... StringScanner#size, StringScanner#captures, StringScanner#values_at を追加 836
* uri
* Relative path operations no longer collapse consecutive slashes to a single slash. 8352
* webrick
* Server Name Indication (SNI) サポートを追加 13729
* WEBrick::HTTPResponse#send_body... -
ruby 1
. 8 . 3 feature (61.0) -
ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))
...。
$ ruby-1.8.2 -e 'p File.join(1, 2)'
"1/2"
$ ruby-1.8.3 -e 'p File.join(1, 2)'
-e:1:in `join': can't convert Fixnum into String (TypeError)
from -e:1
=== 2005-09-16
: File.extname [ruby] [compat]
与えられた pathname がピリオドで終る場合、ピ......lib] [new]
: Net::HTTPHeader#content_type= [lib] [new]
: Net::HTTPHeader#set_content_type [lib] [new]
: Net::HTTPRequest#body(=) [lib] [new]
: Net::HTTPRequest#body_stream(=) [lib] [new]
追加。
: Net::HTTPHeader#each_capitalized [lib] [compat]
: Net::HTTPHeader#each_capitali......をサポートするようになりました。
PROPPATCH, LOCK, UNLOCK, OPTIONS, PROPFIND, DELETE, MOVE, COPY, MKCOL。
: Net::HTTPRequest#body_exist? [lib] [obsolete]
: Net::HTTPResponse#response [lib] [obsolete]
: Net::HTTPResponse#header [lib] [obsolete]
: Net::HTTPResponse#read_h... -
クラス/メソッドの定義 (31.0)
-
クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined
...ray を明示的に指定しても同じ)
class Foo
def bar
end
end
# 間違ったスーパークラスを指定するとエラー
class Foo < String
end
# => superclass mismatch for class Foo (TypeError)
//}
クラス定義式の中は self がそのクラスであることと、
limitのデ......['(' [arg0 ['=' default0]] ... [',' '*' rest_args [, post ...]] [',' key1: [val1]] ... [',' '**'kwrest] [',' '&' block_arg]`)']
式.. (body)
[rescue [error_type,..] [=> evar] [then]
式..]..
[else
式..]
[ensure
式..]......呼び出されると、以下の順で式が評価されます。
* 指定されていれば引数のデフォルト式
* メソッドの本体 body
* 指定されていれば例外の発生の有無によりメソッド定義式の rescue
節または else 節
* 指定されていれば en...