るりまサーチ

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

別のキーワード

  1. _builtin |
  2. set |
  3. ipaddr |
  4. array |
  5. integer |

検索結果

<< 1 2 3 ... > >>

Array#pack(template) -> String (19702.0)

配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。

...です。長さと
して * が指定された時は「残りのデータ全て」の長さを
表します。型指定文字は以下で述べる pack テンプレート文字列の通りです。

buffer が指定されていれば、バッファとして使って返値として返します。
...
..."\x01\xFE".unpack("H*") # => ["01fe"]
"\x01\xFE".unpack("H3") # => ["01f"]
"~".unpack("H2") # => ["7e"]

["01fe"].pack("H*") # => "\x01\xFE"
["7e"].pack("H2") # => "~"
//}

: c

char (8bit 符号つき整数)
//emlist[][ruby]{
"\x01\xFE".unpack("c*") # => [1, -2]

[1, -2].pack("c*") # =>...
...8, 121].pack("cccc") # => "Ruby"
[82, 117, 98, 121].pack("c4") # => "Ruby"
[82, 117, 98, 121].pack("c*") # => "Ruby"

s = ""
[82, 117, 98, 121].each {|c| s << c}
s # => "Ruby"

[82, 117, 98, 121].collect {|c| sprintf "%c", c}.join # => "Ruby"

[82, 117, 98, 121].inject("") {|s, c| s << c...

Array#pack(template, buffer: String.new) -> String (19702.0)

配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。

...です。長さと
して * が指定された時は「残りのデータ全て」の長さを
表します。型指定文字は以下で述べる pack テンプレート文字列の通りです。

buffer が指定されていれば、バッファとして使って返値として返します。
...
..."\x01\xFE".unpack("H*") # => ["01fe"]
"\x01\xFE".unpack("H3") # => ["01f"]
"~".unpack("H2") # => ["7e"]

["01fe"].pack("H*") # => "\x01\xFE"
["7e"].pack("H2") # => "~"
//}

: c

char (8bit 符号つき整数)
//emlist[][ruby]{
"\x01\xFE".unpack("c*") # => [1, -2]

[1, -2].pack("c*") # =>...
...8, 121].pack("cccc") # => "Ruby"
[82, 117, 98, 121].pack("c4") # => "Ruby"
[82, 117, 98, 121].pack("c*") # => "Ruby"

s = ""
[82, 117, 98, 121].each {|c| s << c}
s # => "Ruby"

[82, 117, 98, 121].collect {|c| sprintf "%c", c}.join # => "Ruby"

[82, 117, 98, 121].inject("") {|s, c| s << c...

Array#pack(template) -> String (19683.0)

配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。

...指定文字は以下で述べる pack テンプレート文字列の通りです。


@param template 自身のバイナリとしてパックするためのテンプレートを文字列で指定します。


以下にあげるものは、Array#pack、String#unpack
のテンプレート文字の...
..."\x01\xFE".unpack("H*") # => ["01fe"]
"\x01\xFE".unpack("H3") # => ["01f"]
"~".unpack("H2") # => ["7e"]

["01fe"].pack("H*") # => "\x01\xFE"
["7e"].pack("H2") # => "~"
//}

: c

char (8bit 符号つき整数)
//emlist[][ruby]{
"\x01\xFE".unpack("c*") # => [1, -2]

[1, -2].pack("c*") # =>...
...8, 121].pack("cccc") # => "Ruby"
[82, 117, 98, 121].pack("c4") # => "Ruby"
[82, 117, 98, 121].pack("c*") # => "Ruby"

s = ""
[82, 117, 98, 121].each {|c| s << c}
s # => "Ruby"

[82, 117, 98, 121].collect {|c| sprintf "%c", c}.join # => "Ruby"

[82, 117, 98, 121].inject("") {|s, c| s << c...

Rake::PackageTask#package_dir_path -> String (9218.0)

パッケージに含むファイルを配置するディレクトリを返します。

...パッケージに含むファイルを配置するディレクトリを返します。

//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'

Rake::PackageTask.new("sample", "1.0.0") do |package_task|
pack
age_task.package_dir_path # => "pkg/sample-1.0.0"
end
//}...

Rake::PackageTask#package_dir -> String (9212.0)

パッケージに入れるファイルを保存するディレクトリ名を返します。

...パッケージに入れるファイルを保存するディレクトリ名を返します。

//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'

Rake::PackageTask.new("sample", "1.0.0") do |package_task|
pack
age_task.package_dir # => "pkg"
end
//}...

絞り込み条件を変える

Rake::PackageTask#package_files -> Rake::FileList (9212.0)

パッケージに含むファイルリストを返します。

...記載例とする
require 'rake/packagetask'

IO.write("test1.rb", "test")
IO.write("test2.rb", "test")

Rake::PackageTask.new("sample", "1.0.0") do |package_task|
pack
age_task.package_files # => []
pack
age_task.package_files.include("*.rb")
pack
age_task.package_files # => ["test1.rb", "test2...

String#unpack(template) -> Array (7704.0)

Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。

...Array#pack で生成された文字列を
テンプレート文字列 template にしたがってアンパックし、
それらの要素を含む配列を返します。

@param template pack テンプレート文字列
@return オブジェクトの配列


以下にあげるもの...
..."\x01\xFE".unpack("H*") # => ["01fe"]
"\x01\xFE".unpack("H3") # => ["01f"]
"~".unpack("H2") # => ["7e"]

["01fe"].pack("H*") # => "\x01\xFE"
["7e"].pack("H2") # => "~"
//}

: c

char (8bit 符号つき整数)
//emlist[][ruby]{
"\x01\xFE".unpack("c*") # => [1, -2]

[1, -2].pack("c*") # =>...
...8, 121].pack("cccc") # => "Ruby"
[82, 117, 98, 121].pack("c4") # => "Ruby"
[82, 117, 98, 121].pack("c*") # => "Ruby"

s = ""
[82, 117, 98, 121].each {|c| s << c}
s # => "Ruby"

[82, 117, 98, 121].collect {|c| sprintf "%c", c}.join # => "Ruby"

[82, 117, 98, 121].inject("") {|s, c| s << c...

pack テンプレート文字列 (7491.0)

pack テンプレート文字列

...pack テンプレート文字列

以下にあげるものは、Array#pack、String#unpack
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を続けることができます。「長さ」の代わりに`*'とすることで「残り全て」...
..."\x01\xFE".unpack("H*") # => ["01fe"]
"\x01\xFE".unpack("H3") # => ["01f"]
"~".unpack("H2") # => ["7e"]

["01fe"].pack("H*") # => "\x01\xFE"
["7e"].pack("H2") # => "~"
//}

: c

char (8bit 符号つき整数)
//emlist[][ruby]{
"\x01\xFE".unpack("c*") # => [1, -2]

[1, -2].pack("c*") # =>...
...8, 121].pack("cccc") # => "Ruby"
[82, 117, 98, 121].pack("c4") # => "Ruby"
[82, 117, 98, 121].pack("c*") # => "Ruby"

s = ""
[82, 117, 98, 121].each {|c| s << c}
s # => "Ruby"

[82, 117, 98, 121].collect {|c| sprintf "%c", c}.join # => "Ruby"

[82, 117, 98, 121].inject("") {|s, c| s << c...
...pack テンプレート文字列

以下にあげるものは、Array#pack、String#unpack、String#unpack1
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を続けることができます。「長さ」の代わりに`*'とすることで...

rake/gempackagetask (6042.0)

Gem Spec ファイルを元にして Gem パッケージを作成するタスクを定義するためのライブラリです。

...以下のタスクを定義します。

: PACKAGE_DIR/NAME-VERSION.gem
Gem パッケージを作成します。

例:
require 'rubygems'

spec = Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.summary = "Ruby based make-like utility."
s.name = 'rake'...
...re = 'rake'
s.files = PKG_FILES
s.description = <<EOF
Rake is a Make-like program implemented in Ruby. Tasks
and dependencies are specified in standard Ruby syntax.
EOF
end

Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_zip = true
pkg.need_tar = true
end...

rake/packagetask (6036.0)

配布するパッケージ (zip, tar, etc...) を作成するためのタスクを定義します。

...: package
パッケージを作成します。
: clobber_package
作成したパッケージを削除します。このタスクは clobber タスクにも追加されます。
: repackage
パッケージが古くない場合でもパッケージを再作成します。
: PACKAGE_DIR/NAME-VE...
...gz
Rake::PackageTask#need_tar が真の場合 gzip された tar パッケージを作成します。
: PACKAGE_DIR/NAME-VERSION.tar.gz
Rake::PackageTask#need_tar_gz が真の場合 gzip された tar パッケージを作成します。
: PACKAGE_DIR/NAME-VERSION.tar.bz2
Rake::PackageTask#nee...
...た tar パッケージを作成します。
: PACKAGE_DIR/NAME-VERSION.zip
Rake::PackageTask#need_zip が真の場合 zip されたパッケージを作成します。

例:
Rake::PackageTask.new("rake", "1.2.3") do |t|
t.need_tar = true
t.package_files.include("lib/**/*.rb")
end...

絞り込み条件を変える

ruby 1.6 feature (5388.0)

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

...グ修正がメイン
になります。

((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。

== 1.6.8 (2002-12-24) -> stable-snapshot

: 2003-01-22: errno

EAGAIN と EWOULDBLOCK が同じ値の...
...> ruby 1.6.7 (2002-03-01) [i586-linux]
Errno::EAGAIN
Errno::EWOULDBLOCK

=> ruby 1.6.8 (2002-12-24) [i586-linux]
Errno::EAGAIN
-
:2: uninitialized constant EWOULDBLOCK at Errno (NameError)

=> ruby 1.6.8 (2003-02-13) [i586-linux]...
...rt { Thread.stop }
sleep

: 2002-04-17: Regexp#inspect

((<ruby-bugs-ja:PR#222>))

p %r{\/}

=> ruby 1.6.7 (2002-03-01) [i586-linux]
/\\//

=> ruby 1.6.7 (2002-05-04) [i586-linux]
/\//

: 2002-04-15: pack('U')

pack
('U') を unpack('U') すると元に戻らない...
<< 1 2 3 ... > >>