[#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:42699] [Ruby 1.9-Bug#4128] String#kconvでfrom_encを指定していないときにString#encodingを使うようになっていない

From: Kouhei Yanagita <redmine@...>
Date: 2010-12-06 14:00:08 UTC
List: ruby-dev #42699
チケット #4128 が更新されました。 (by Kouhei Yanagita)


その上の方にも直すべきコメントがありましたのでパッチを送り直します。


Index: ext/nkf/lib/kconv.rb
===================================================================
--- ext/nkf/lib/kconv.rb        (リビジョン 30091)
+++ ext/nkf/lib/kconv.rb        (作業コピー)
@@ -51,8 +51,8 @@
   # call-seq:
   #    Kconv.kconv(str, to_enc, from_enc=nil)
   #
-  # Convert <code>str</code> to out_code.
-  # <code>out_code</code> and <code>in_code</code> are given as constants of Kconv.
+  # Convert <code>str</code> to <code>to_enc</code>.
+  # <code>to_enc</code> and <code>from_enc</code> are given as constants of Kconv or Encoding objects.
   def kconv(str, to_enc, from_enc=nil)
     opt = ''
     opt += ' --ic=' + from_enc.to_s if from_enc
@@ -199,10 +199,10 @@
   # call-seq:
   #    String#kconv(to_enc, from_enc)
   #
-  # Convert <code>self</code> to out_code.
-  # <code>out_code</code> and <code>in_code</code> are given as constants of Kconv.
+  # Convert <code>self</code> to <code>to_enc</code>.
+  # <code>to_enc</code> and <code>from_enc</code> are given as constants of Kconv or Encoding objects.
   def kconv(to_enc, from_enc=nil)
-    form_enc = self.encoding if !from_enc && self.encoding != Encoding.list[0]
+    from_enc = self.encoding if !from_enc && self.encoding != Encoding.list[0]
     Kconv::kconv(self, to_enc, from_enc)
   end
 

----------------------------------------
http://redmine.ruby-lang.org/issues/show/4128

----------------------------------------
http://redmine.ruby-lang.org

In This Thread