種類
- インスタンスメソッド (60)
- 文書 (36)
- ライブラリ (24)
ライブラリ
- ビルトイン (60)
クラス
-
Encoding
:: Converter (48) - Symbol (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) -
primitive
_ convert (48) -
rexml
/ parsers / streamparser (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) - yaml (12)
検索結果
先頭5件
- Symbol
# encoding -> Encoding - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol
-
Symbol
# encoding -> Encoding (21254.0) -
シンボルに対応する文字列のエンコーディング情報を表現した Encoding オブ ジェクトを返します。
...シンボルに対応する文字列のエンコーディング情報を表現した Encoding オブ
ジェクトを返します。
例:
# encoding: utf-8
:foo.encoding # => #<Encoding:US-ASCII>
:あかさたな.encoding # => #<Encoding:UTF-8>
@see String#encoding... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol (3142.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...ッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buff......表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Conv......lete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_convert(src, dst)
p [ret, src, ds... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol (3142.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...ッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buff......表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Conv......lete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_convert(src, dst)
p [ret, src, ds... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (3142.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...ッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buff......表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Conv......lete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_convert(src, dst)
p [ret, src, ds... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (3142.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...ッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buff......表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Conv......lete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_convert(src, dst)
p [ret, src, ds... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (30.0) -
1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))
...追加
(({str[n, 0] = other})) と同じ(ただし self を返す)
=== Struct
: ((<Struct/each_pair>)) [new]
追加。
=== Symbol
: ((<Symbol/Symbol.all_symbols>)) [new]
追加 ((<ruby-dev:12921>))
=== SystemCallError
: ((<SystemCallError/SystemCallError.===>)) [new]
追......) が
indexes の代わりでしたが、こちらも使用すると警告が出ます)。
: ((<Fixnum#to_sym|Fixnum/to_sym>)) [new]
: ((<String#to_sym|String/to_sym>)) [new]
追加(Symbol#intern はなくなった)
== 追加された定数
: ((<Float::DIG|Float/DIG>)) [new]
: ((<Float::EPSI......p Regexp.new(//is, Regexp::EXTENDED, "e")
=> ruby 1.6.8 (2003-08-03) [i586-linux]
//xe
=> -:1: warning: flags and encoding ignored
ruby 1.8.0 (2003-02-16) [i586-linux]
//is
=== String
: ((<String#chomp|String/chomp>)) [change]
: ((<Strin... -
yaml (30.0)
-
構造化されたデータを表現するフォーマットであるYAML (YAML Ain't Markup Language) を扱うためのライブラリです。
...事ができます。
=== タグの指定
!ruby/sym :foo などのようにタグを指定することで、読み込み時に記述した値
の型を指定できます。
//emlist[例][ruby]{
require 'yaml'
p YAML.load(<<~EOS)
---
!ruby/sym :foo
EOS
# => :foo
//}
yaml では、Ruby 向け......ジェクト
* !ruby/string: String オブジェクト
* !ruby/struct: Struct オブジェクト
* !ruby/sym(もしくは !ruby/symbol): Symbol オブジェクト
* !ruby/encoding: Encoding オブジェクト
* !ruby/exception: 例外オブジェクト
* !ruby/object:<クラス名>: 上記以......リ以外で yaml を扱うライブラリを使用する場合な
どに注意してください。
* ":foo" のような文字列はそのまま Symbol として扱える
* "y" や "n" は真偽値として扱われない
=== 参考
YAML Specification
* https://yaml.org/spec/
* https://yam... -
ruby 1
. 8 . 4 feature (24.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...[platform]: 対応プラットフォームの追加
== 目次
* ((<ruby 1.8.4 feature/Ruby本体>))
* ((<ruby 1.8.4 feature/Symbol [bug]>))
* ((<ruby 1.8.4 feature/Symbol [bug]>))
* ((<ruby 1.8.4 feature/super [bug]>))
* ((<ruby 1.8.4 feature/正規表現 [bug]>))
* ((<ruby 1.8.4 feature......ture/Sun [bug]>))
* ((<ruby 1.8.4 feature/IA64 [bug]>))
== Ruby本体
: Symbol [bug]
# * parse.y (dsym): prohibit empty symbol literal by interpolation.
# fixed: [ruby-talk:166529]
式展開で空のSymbolを作ることができたバグの修正。 ((<ruby-talk:166529>))......は非互換となります.
: REXML [compat]
#Fri Dec 9 23:31:02 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * lib/rexml/encoding.rb (encoding=): give priority to particular
# conversion to iconv. [ruby-core:06520]
日本語のエンコーディング変換にiconvよ... -
ruby 1
. 9 feature (24.0) -
ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。
...erver
削除
=== 2006-06-11
: __callee__ [new]
: __method__ [new]
((<URL:http://www.dm4lab.to/~usa/ruby/d/200606a.html#id20060610_P1_7>))
: Symbol#to_proc
=== 2006-06-10
* 新機能
: BasicObject が導入されました [new]
: local という visibility および Module#local, Modul......ディングを変換するメソッドを公開。
valueのエンコーディングは要素の内部エンコーディングからoutput_encoding=で設定したエンコーディングへ変換されます。
=== 2005-02-02
: ((<ripper/Ripper.slice>)) [ruby] [experimental]
追加。((<U......ようになりました。
((<ruby-dev:23281>))
=== 2004-03-24
: Module#class_variable_get [ruby] [new]
=== 2004-03-19
: {sym: val} [ruby] [new]
{:sym => val} を {sym: val} のように書くことができるようになりました。
=== 2004-03-12
: File.fnmatch [change]
File::FNM_PA...