[#42735] [Ruby 1.9-Feature#4147][Open] Array#sample で重みを指定したい — Yoji Ojima <redmine@...>

Feature #4147: Array#sample で重みを指定したい

52 messages 2010/12/10
[#42791] [Ruby 1.9-Feature#4147][Assigned] Array#sample で重みを指定したい — Shyouhei Urabe <redmine@...> 2010/12/18

チケット #4147 が更新されました。 (by Shyouhei Urabe)

[#42800] Re: [Ruby 1.9-Feature#4147][Assigned] Array#sample で重みを指定したい — Masaya TARUI <tarui@...> 2010/12/19

> じゃあ反対ないので実装はともかく、この仕様は基本入れる方向で考えましょう。反対の人は意思表示お早めに。

[#42763] [Ruby 1.9-Bug#4159][Open] test_block_variables(TestRipper::ParserEvents) が失敗する — Kouhei Yanagita <redmine@...>

Bug #4159: test_block_variables(TestRipper::ParserEvents) が失敗する

8 messages 2010/12/14

[#42894] [Ruby 1.8-Feature#4207][Open] これから「1.8.8」の話をしよう -- 1.8がこの先生きのこるには — Shyouhei Urabe <redmine@...>

Feature #4207: これから「1.8.8」の話をしよう -- 1.8がこの先生きのこるには

24 messages 2010/12/26
[#42935] Re: [Ruby 1.8-Feature#4207][Open] これから「1.8.8」の話をしよう -- 1.8がこの先生きのこるには — Kenta Murata <muraken@...> 2011/01/04

むらたです。

[#42936] Re: [Ruby 1.8-Feature#4207][Open] これから「1.8.8」の話をしよう -- 1.8がこの先生きのこるには — Kenta Murata <muraken@...> 2011/01/05

むらたです。

[ruby-dev:42694] Re: [Ruby 1.9-Bug#4120][Assigned] 2 failures on test/mkmf/test_convertible.rb

From: KOSAKI Motohiro <kosaki.motohiro@...>
Date: 2010-12-06 12:09:36 UTC
List: ruby-dev #42694
2010年12月6日15:53 U.Nakamura <usa@garbagecollect.jp>:
> こんにちは、なかむら(う)です。
>
> In message "[ruby-dev:42688] Re: [Ruby 1.9-Bug#4120][Assigned] 2 failures on test/mkmf/test_convertible.rb"
>    on Dec.06,2010 15:34:02, <nobu@ruby-lang.org> wrote:
>> VCでは以下のコードがエラーにならずに警告しか出ないからなのですが、何を
>> 考えているんでしょうね。
>
> 規格上これをエラーにしないといけないというルールはないような
> 気がするので[要確認]、普通に同じ幅なので警告で許してやろうと
> いうことでしょうかねえ。

最近はC言語の規格もインターネットで閲覧できるんですね。インターネット万歳

http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf

3.5 DECLARATIONS
(snip)
   All declarations in the same scope that refer to the same object or
function shall specify compatible types.

compatible typesの定義をみると

6.2.7 Compatible type and composite type

Two types have compatible type if their types are the same. Additional rules for
determining whether two types are compatible are described in 6.7.2
for type specifiers,
in 6.7.3 for type qualifiers, and in 6.7.5 for declarators.


なんか、基本厳密一致だけど詳細は type specifiersの章を見ろというのでみる

6.7.2 Type specifiers
Syntax
    type-specifier:
      void
      char
      short
      int
      long
      float
      double
      signed
      unsigned
      _Bool
      _Complex
      struct-or-union-specifier ∗
      enum-specifier
      typedef-name

Constraints
(snip)
the type specifiers may occur in any order, possibly
intermixed with the other declaration specifiers.

順序とか気にしなくていいよ。だそうな
適当に斜め読みしただけなので見落としてるかも知れませんがgccが正しそうな雰囲気。
JIS X3010 (ようするにC89)も見ましたが、同じように見えます。


>
> なので、だとしたら、これがエラーになることを利用する奴が悪い
> ということになるんじゃないでしょうか。

とはいえ、VCを無視するのは現実的ではないのでテストケース側を直すことに賛成します。

In This Thread