<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,6 +3,16 @@ Sat Jul 17 05:26:27 2004  Dave Thomas  &lt;dave@pragprog.com&gt;
 	* lib/rdoc/diagram.rb: Incorporate Micheal Neuman's
 	  client-side imagemao patch
 
+Sat Jul 17 01:57:03 2004  Yukihiro Matsumoto  &lt;matz@ruby-lang.org&gt;
+
+	* eval.c (THREAD_ALLOC): th-&gt;thread should be initialized to NULL.
+	  [ruby-talk:106657]  The solution was found by Guy Decoux.
+
+Fri Jul 16 22:30:28 2004  Michael Neumann  &lt;mneumann@ntecs.de&gt;
+
+	* file.c (rb_stat_dev_major): new methods File::Stat#dev_major and
+	  #dev_minor. [ruby-core:03195]
+
 Fri Jul 16 15:23:53 2004  Nobuyoshi Nakada  &lt;nobu@ruby-lang.org&gt;
 
 	* eval.c (return_jump, break_jump): raise unexpceted local jump</diff>
      <filename>ChangeLog</filename>
    </modified>
    <modified>
      <diff>@@ -197,15 +197,24 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo &quot;${machine}-${os}${release}&quot;
 	exit 0 ;;
+    amd64:OpenBSD:*:*)
+	echo x86_64-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
     amiga:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
     arc:OpenBSD:*:*)
 	echo mipsel-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    cats:OpenBSD:*:*)
+	echo arm-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
     hp300:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    luna88k:OpenBSD:*:*)
+    	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
     mac68k:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
@@ -221,9 +230,6 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
     mvmeppc:OpenBSD:*:*)
 	echo powerpc-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
-    pegasos:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
     pmax:OpenBSD:*:*)
 	echo mipsel-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
@@ -239,10 +245,24 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
     *:OpenBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:MirBSD:*:*)
+	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit 0 ;;
     alpha:OSF1:*:*)
-	if test $UNAME_RELEASE = &quot;V4.0&quot;; then
+	case $UNAME_RELEASE in
+	*4.0)
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-	fi
+		;;
+	*5.*)
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
 	# According to Compaq, /usr/sbin/psrinfo has been available on
 	# OSF/1 and Tru64 systems produced since 1995.  I hope that
 	# covers most systems running today.  This code pipes the CPU
@@ -280,11 +300,12 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
 	    &quot;EV7.9 (21364A)&quot;)
 		UNAME_MACHINE=&quot;alphaev79&quot; ;;
 	esac
+	# A Pn.n version is a patched version.
 	# A Vn.n version is a released version.
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses &quot;1.2&quot; for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 	exit 0 ;;
     Alpha*:OpenVMS:*:*)
 	echo alpha-hp-vms
@@ -405,6 +426,9 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
         exit 0 ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit 0 ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
 	exit 0 ;;
@@ -821,16 +845,19 @@ EOF
 	echo ${UNAME_MACHINE}-pc-minix
 	exit 0 ;;
     arm*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     cris:Linux:*:*)
-	echo cris-axis-linux
+	echo cris-axis-linux-gnu
 	exit 0 ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     mips:Linux:*:*)
 	eval $set_cc_for_build
@@ -849,7 +876,7 @@ EOF
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2&gt;/dev/null | grep ^CPU=`
-	test x&quot;${CPU}&quot; != x &amp;&amp; echo &quot;${CPU}-unknown-linux&quot; &amp;&amp; exit 0
+	test x&quot;${CPU}&quot; != x &amp;&amp; echo &quot;${CPU}-unknown-linux-gnu&quot; &amp;&amp; exit 0
 	;;
     mips64:Linux:*:*)
 	eval $set_cc_for_build
@@ -868,13 +895,13 @@ EOF
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2&gt;/dev/null | grep ^CPU=`
-	test x&quot;${CPU}&quot; != x &amp;&amp; echo &quot;${CPU}-unknown-linux&quot; &amp;&amp; exit 0
+	test x&quot;${CPU}&quot; != x &amp;&amp; echo &quot;${CPU}-unknown-linux-gnu&quot; &amp;&amp; exit 0
 	;;
     ppc:Linux:*:*)
-	echo powerpc-unknown-linux
+	echo powerpc-unknown-linux-gnu
 	exit 0 ;;
     ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux
+	echo powerpc64-unknown-linux-gnu
 	exit 0 ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' &lt; /proc/cpuinfo` in
@@ -888,33 +915,33 @@ EOF
         esac
 	objdump --private-headers /bin/sh | grep ld.so.1 &gt;/dev/null
 	if test &quot;$?&quot; = 0 ; then LIBC=&quot;libc1&quot; ; else LIBC=&quot;&quot; ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
 	exit 0 ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2&gt;/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux ;;
-	  PA8*) echo hppa2.0-unknown-linux ;;
-	  *)    echo hppa-unknown-linux ;;
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
 	esac
 	exit 0 ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux
+	echo hppa64-unknown-linux-gnu
 	exit 0 ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux
 	exit 0 ;;
     sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     x86_64:Linux:*:*)
-	echo x86_64-unknown-linux
+	echo x86_64-unknown-linux-gnu
 	exit 0 ;;
     i*86:Linux:*:*)
 	# The BFD linker knows what the default object file format is, so
@@ -929,20 +956,47 @@ EOF
 				    p'`
         case &quot;$ld_supported_targets&quot; in
 	  elf32-i386)
-		TENTATIVE=&quot;${UNAME_MACHINE}-pc-linux&quot;
+		TENTATIVE=&quot;${UNAME_MACHINE}-pc-linux-gnu&quot;
 		;;
 	  a.out-i386-linux)
-		echo &quot;${UNAME_MACHINE}-pc-linux-aout&quot;
+		echo &quot;${UNAME_MACHINE}-pc-linux-gnuaout&quot;
 		exit 0 ;;
 	  coff-i386)
-		echo &quot;${UNAME_MACHINE}-pc-linux-coff&quot;
+		echo &quot;${UNAME_MACHINE}-pc-linux-gnucoff&quot;
 		exit 0 ;;
 	  &quot;&quot;)
-		# Either a pre-BFD a.out linker (linux-oldld) or
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
 		# one that does not give us useful --help.
-		echo &quot;${UNAME_MACHINE}-pc-linux-oldld&quot;
+		echo &quot;${UNAME_MACHINE}-pc-linux-gnuoldld&quot;
 		exit 0 ;;
 	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' &lt;&lt; EOF &gt;$dummy.c
+	#include &lt;features.h&gt;
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ &gt;= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#ifdef __INTEL_COMPILER
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2&gt;/dev/null | grep ^LIBC=`
+	test x&quot;${LIBC}&quot; != x &amp;&amp; echo &quot;${UNAME_MACHINE}-pc-linux-${LIBC}&quot; &amp;&amp; exit 0
 	test x&quot;${TENTATIVE}&quot; != x &amp;&amp; echo &quot;${TENTATIVE}&quot; &amp;&amp; exit 0
 	;;
     i*86:DYNIX/ptx:4*:*)
@@ -1042,7 +1096,7 @@ EOF
     M680?0:D-NIX:5.3:*)
 	echo m68k-diab-dnix
 	exit 0 ;;
-    M68*:*:R3V[567]*:*)
+    M68*:*:R3V[5678]*:*)
 	test -r /sysV68 &amp;&amp; echo 'm68k-motorola-sysv' &amp;&amp; exit 0 ;;
     3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
 	OS_REL=''
@@ -1146,7 +1200,7 @@ EOF
 	    *86) UNAME_PROCESSOR=i686 ;;
 	    powerpc) UNAME_PROCESSOR=powerpc ;;
 	esac
-	echo ${UNAME_PROCESSOR}-apple-darwin
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 	exit 0 ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`</diff>
      <filename>config.guess</filename>
    </modified>
    <modified>
      <diff>@@ -11166,6 +11166,7 @@ rb_thread_group(thread)
     th-&gt;priority = 0;\
     th-&gt;thgroup = thgroup_default;\
     th-&gt;locals = 0;\
+    th-&gt;thread = 0;\
 } while (0)
 
 static rb_thread_t</diff>
      <filename>eval.c</filename>
    </modified>
    <modified>
      <diff>@@ -192,6 +192,52 @@ rb_stat_dev(self)
     return INT2NUM(get_stat(self)-&gt;st_dev);
 }
 
+/*
+ *  call-seq:
+ *     stat.dev_major   =&gt; fixnum
+ *  
+ *  Returns the major part of &lt;code&gt;File_Stat#dev&lt;/code&gt; or
+ *  &lt;code&gt;nil&lt;/code&gt;.
+ *     
+ *     File.stat(&quot;/dev/fd1&quot;).dev_major   #=&gt; 2
+ *     File.stat(&quot;/dev/tty&quot;).dev_major   #=&gt; 5
+ */
+
+static VALUE
+rb_stat_dev_major(self)
+    VALUE self;
+{
+#if defined(major)
+    long dev = get_stat(self)-&gt;st_dev;
+    return ULONG2NUM(major(dev));
+#else
+    return Qnil;
+#endif
+}
+
+/*
+ *  call-seq:
+ *     stat.dev_minor   =&gt; fixnum
+ *  
+ *  Returns the minor part of &lt;code&gt;File_Stat#dev&lt;/code&gt; or
+ *  &lt;code&gt;nil&lt;/code&gt;.
+ *     
+ *     File.stat(&quot;/dev/fd1&quot;).dev_minor   #=&gt; 1
+ *     File.stat(&quot;/dev/tty&quot;).dev_minor   #=&gt; 0
+ */
+
+static VALUE
+rb_stat_dev_minor(self)
+    VALUE self;
+{
+#if defined(minor)
+    long dev = get_stat(self)-&gt;st_dev;
+    return ULONG2NUM(minor(dev));
+#else
+    return Qnil;
+#endif
+}
+
 
 /*
  *  call-seq:
@@ -4148,6 +4194,8 @@ Init_File()
     rb_define_method(rb_cStat, &quot;&lt;=&gt;&quot;, rb_stat_cmp, 1);
 
     rb_define_method(rb_cStat, &quot;dev&quot;, rb_stat_dev, 0);
+    rb_define_method(rb_cStat, &quot;dev_major&quot;, rb_stat_dev_major, 0);
+    rb_define_method(rb_cStat, &quot;dev_minor&quot;, rb_stat_dev_minor, 0);
     rb_define_method(rb_cStat, &quot;ino&quot;, rb_stat_ino, 0);
     rb_define_method(rb_cStat, &quot;mode&quot;, rb_stat_mode, 0);
     rb_define_method(rb_cStat, &quot;nlink&quot;, rb_stat_nlink, 0);</diff>
      <filename>file.c</filename>
    </modified>
    <modified>
      <diff>@@ -271,7 +271,7 @@ end
 
 YAML.add_ruby_type( /^exception/ ) { |type, val|
     type, obj_class = YAML.read_type_class( type, Exception )
-    o = YAML.object_maker( obj_class, { 'mesg' =&gt; val.delete( 'message' ) }, true )
+    o = YAML.object_maker( obj_class, { 'mesg' =&gt; val.delete( 'message' ) } )
     val.each_pair { |k,v|
 		o.instance_variable_set(&quot;@#{k}&quot;, v)
 	}
@@ -290,7 +290,7 @@ class String
         ( self.count( &quot;^ -~&quot;, &quot;^\r\n&quot; ) / self.size &gt; 0.3 || self.count( &quot;\x00&quot; ) &gt; 0 )
     end
     def to_yaml_type
-        &quot;!ruby/string#{ if self.class != ::String; &quot;:#{ self.class }&quot;; end }&quot;
+        &quot;!ruby/string#{ &quot;:#{ self.class }&quot; if self.class != ::String }&quot;
     end
     def to_yaml_fold
         nil
@@ -315,8 +315,8 @@ class String
                     }
                 elsif self.is_binary_data?
                     out.binary_base64( self )
-                elsif self =~ /^ |#{YAML::ESCAPE_CHAR}| $/
-                    complex = false
+                # elsif self =~ /^ |#{YAML::ESCAPE_CHAR}| $/
+                #     complex = false
                 else
                     out.node_text( self, to_yaml_fold )
                 end
@@ -326,7 +326,7 @@ class String
                             self
                         elsif empty?
                             &quot;''&quot;
-                        elsif self =~ /^[^#{YAML::WORD_CHAR}]| \#|#{YAML::ESCAPE_CHAR}|[#{YAML::SPACE_INDICATORS}]( |$)| $|\n|\'/
+                        elsif self =~ /^[^#{YAML::WORD_CHAR}\/]| \#|#{YAML::ESCAPE_CHAR}|[#{YAML::SPACE_INDICATORS}]( |$)| $|\n|\'/
                             &quot;\&quot;#{YAML.escape( self )}\&quot;&quot; 
                         elsif YAML.detect_implicit( self ) != 'str'
                             &quot;\&quot;#{YAML.escape( self )}\&quot;&quot; 
@@ -371,7 +371,7 @@ end
 
 symbol_proc = Proc.new { |type, val|
 	if String === val
-        val = YAML::load( &quot;--- #{val}&quot;) if val =~ /^[&quot;'].*[&quot;']$/
+        val = YAML::load( &quot;--- #{val}&quot;) if val =~ /^[&quot;'].*['&quot;]$/
 		val.intern
 	else
 		raise YAML::Error, &quot;Invalid Symbol: &quot; + val.inspect
@@ -392,7 +392,9 @@ class Range
     end
 	def to_yaml( opts = {} )
 		YAML::quick_emit( self.object_id, opts ) { |out|
-            if self.begin.is_complex_yaml? or self.end.is_complex_yaml? or not to_yaml_properties.empty?
+            if self.begin.is_complex_yaml? or self.begin.respond_to? :to_str or
+              self.end.is_complex_yaml? or self.end.respond_to? :to_str or
+              not to_yaml_properties.empty?
                 out.map( to_yaml_type ) { |map|
                     map.add( 'begin', self.begin )
                     map.add( 'end', self.end )
@@ -414,9 +416,9 @@ end
 
 YAML.add_ruby_type( /^range/ ) { |type, val|
     type, obj_class = YAML.read_type_class( type, ::Range )
-    inr = '(\w+|[+-]*\d+(?:\.\d+)?|&quot;(?:[^\\&quot;]|\\.)*&quot;)'
+    inr = %r'(\w+|[+-]?\d+(?:\.\d+)?(?:e[+-]\d+)?|&quot;(?:[^\\&quot;]|\\.)*&quot;)'
     opts = {}
-	if String === val and val =~ /^#{inr}(\.{2,3})#{inr}$/
+	if String === val and val =~ /^#{inr}(\.{2,3})#{inr}$/o
         r1, rdots, r2 = $1, $2, $3
         opts = {
             'begin' =&gt; YAML.load( &quot;--- #{r1}&quot; ),</diff>
      <filename>lib/yaml/rubytypes.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a543a1ead6c29fea7ee3acc381bdbc1a92619ca6</id>
    </parent>
  </parents>
  <author>
    <name>matz</name>
    <email>matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
  </author>
  <url>http://github.com/ice799/matzruby/commit/370bdf3c86bcc6e10c9328eba64c1a8acde42f52</url>
  <id>370bdf3c86bcc6e10c9328eba64c1a8acde42f52</id>
  <committed-date>2004-07-16T19:23:52-07:00</committed-date>
  <authored-date>2004-07-16T19:23:52-07:00</authored-date>
  <message>* eval.c (THREAD_ALLOC): th-&gt;thread should be initialized to NULL.
  [ruby-talk:106657]  The solution was found by Guy Decoux.

* file.c (rb_stat_dev_major): new methods File::Stat#dev_major and
  #dev_minor. [ruby-core:03195]


git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e</message>
  <tree>dd786449619d584beeab06c4f89820a7c06df73c</tree>
  <committer>
    <name>matz</name>
    <email>matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
  </committer>
</commit>
