るりまサーチ

最速Rubyリファレンスマニュアル検索!
43件ヒット [1-43件を表示] (0.025秒)

別のキーワード

  1. module attr
  2. module new
  3. module constants
  4. module module_eval
  5. module class_eval

ライブラリ

クラス

モジュール

キーワード

検索結果

Fiddle::Importer#union(signature) -> Class (18119.0)

C の共用体型に対応する Ruby のクラスを構築して返します。

...dle::Importer#struct と
ほぼ同様です。C における
typedef union epoll_data
{
void *ptr;
int fd;
uint32_t u32;
uint64_t u64;
} epoll_data_t;
は、Ruby上では
require 'fiddle/import'

module
M
extend Fiddle::Importer
dlload "libc.so.6"
typealias("u...
...unsigned long long")

EPollData = union(["void *ptr",
"int fd",
"uint32_t u32",
"uint64_t u64",
])
end
となります。

返されるクラスは Fiddle::CUnion を継承しています。

1.9.x で...

NEWS for Ruby 3.0.0 (102.0)

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

...is now a SyntaxError instead of a LocalJumpError. 15575
* When a class variable is overtaken by the same definition in an
ancestor class/module, a RuntimeError is now raised (previously,
it only issued a warning in verbose mode). Additionally, accessing a
class variable from the t...
...* Module
* Module#include and Module#prepend now affect classes and modules that have already included or prepended the receiver, mirroring the behavior if the arguments were included in the receiver before the other modules and classes included or prepended the receiver. 9573
* Module#pu...
...Static analysis

=== RBS

* RBS is a new language for type definition of Ruby programs. It allows writing types of classes and modules with advanced types including union types, overloading, generics, and _interface types_ for duck typing.
* Ruby ships with type definitions for core/stdlib class...

NEWS for Ruby 2.6.0 (30.0)

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

...リップフロップが非推奨になりました。 5400

=== 組み込みクラスの更新

* Array
* 新規メソッド
* Array#union と Array#difference 14097
* 変更されたメソッド
* Array#to_h はブロックを受け取りキーと値のペアを新しいキ...
...* 関数合成用に Method#<< と Method#>> が追加されました。 6284

* Module
* 変更されたメソッド
* Module#method_defined?, Module#private_method_defined?,
Module
#protected_method_defined? が省略可能な第2引数を受け取るように
...

Fiddle::Importer#sizeof(t) -> Integer (12.0)

C における sizeof(t) の値を返します。

...ます。

Fiddle::Importer#struct で定義した
構造体クラスを渡すと、その構造体のサイズを返します。
Fiddle::Importer#union で定義した共用体クラスも同様です。

t がクラスの場合、t が to_ptr というインスタンスメソッドを持ってい...
...字列を渡し、それが表している型を Fiddle が知らなかった
場合に発生します

例:

require 'fiddle/import'

module
M
extend Fiddle::Importer
Timeval = struct(["long tv_sec", "long tv_usec"])
p sizeof("char") # => 1
p sizeof("void*") # => 8...

WIN32OLE_TYPE#ole_type -> String | nil (12.0)

selfの型の種類(TYPEKIND)を取得します。

...ole_typeには以下があります。

: Enum
列挙子(0)
: Record
ユーザ定義型(メソッドを持たない構造体)(1)
: Module
モジュール(静的関数やデータだけを保持)(2)
: Interface
COMのインターフェイス(メソッド定義の集合...
...ションサーバ(4)
: Class
コンポーネントクラス(InterfaceやDispatchの実装)(5)
: Alias
他の型の別名(6)
: Union
共用体(7)
: Max
型の種類を示す列挙体の終端マーカ(8)

MaxはTYPEKINDの終端マーカなので意味を持ちませ...

絞り込み条件を変える