[#7055] More on VC++ 2005 — Austin Ziegler <halostatue@...>

Okay. I've got Ruby compiling. I'm attempting to get everything in

17 messages 2006/01/05
[#7058] Re: More on VC++ 2005 — nobuyoshi nakada <nobuyoshi.nakada@...> 2006/01/06

Hi,

[#7084] mathn: ugly warnings — hadmut@... (Hadmut Danisch)

Hi,

22 messages 2006/01/10
[#7097] Re: mathn: ugly warnings — Daniel Berger <Daniel.Berger@...> 2006/01/10

Hadmut Danisch wrote:

[#7098] Design contracts and refactoring (was Re: mathn: ugly warnings) — mathew <meta@...> 2006/01/10

Daniel Berger wrote:

[#7118] Re: Design contracts and refactoring (was Re: mathn: ugly warnings) — mathew <meta@...> 2006/01/12

*Dean Wampler *<deanwampler gmail.com> writes:

[#7226] Fwd: Re: Question about massive API changes — "Sean E. Russell" <ser@...>

Hello,

23 messages 2006/01/28
[#7228] Re: Question about massive API changes — Caleb Tennis <caleb@...> 2006/01/28

>

Re: 1.8.x, YAML, and release management

From: "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
Date: 2006-01-03 08:04:00 UTC
List: ruby-core #7048
>This patch seems to be working. But I'm not familier with yaml, so can anyone
>test this? (I found another problem on Numeric. Rational and Complex are not
>treated properly)

Sorry, patch was broken. Try again...

Index: lib/yaml/rubytypes.rb
===================================================================
RCS file: /src/ruby/lib/yaml/rubytypes.rb,v
retrieving revision 1.16.2.9
diff -u -p -r1.16.2.9 rubytypes.rb
--- lib/yaml/rubytypes.rb	20 Sep 2005 06:46:45 -0000	1.16.2.9
+++ lib/yaml/rubytypes.rb	3 Jan 2006 08:00:21 -0000
@@ -352,7 +352,17 @@ class Date
 	end
 end
 
-class Numeric
+class Integer
+    yaml_as "tag:yaml.org,2002:int"
+       def to_yaml( opts = {} )
+               YAML::quick_emit( nil, opts ) do |out|
+            out.scalar( "tag:yaml.org,2002:int", self.to_s, :plain )
+        end
+       end
+end
+
+class Float
+    yaml_as "tag:yaml.org,2002:float"
 	def to_yaml( opts = {} )
 		YAML::quick_emit( nil, opts ) do |out|
             str = self.to_s
@@ -363,19 +373,11 @@ class Numeric
             elsif str == "NaN"
                 str = ".NaN"
             end
-            out.scalar( taguri, str, :plain )
+            out.scalar( "tag:yaml.org,2002:float", str, :plain )
         end
 	end
 end
 
-class Fixnum
-    yaml_as "tag:yaml.org,2002:int"
-end
-
-class Float
-    yaml_as "tag:yaml.org,2002:float"
-end
-
 class TrueClass
     yaml_as "tag:yaml.org,2002:bool#yes"
 	def to_yaml( opts = {} )


In This Thread