[前][次][番号順一覧][スレッド一覧]

ruby-changes:18287

From: yugui <ko1@a...>
Date: Thu, 23 Dec 2010 19:49:45 +0900 (JST)
Subject: [ruby-changes:18287] Ruby:r30309 (ruby_1_9_2): merges r30084 from trunk into ruby_1_9_2.

yugui	2010-12-23 19:49:13 +0900 (Thu, 23 Dec 2010)

  New Revision: 30309

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30309

  Log:
    merges r30084 from trunk into ruby_1_9_2.
    --
    * ruby.c (load_file_internal): decrement for ungotten line.
      [ruby-dev:42680]

  Modified files:
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/ruby.c
    branches/ruby_1_9_2/test/ruby/test_rubyoptions.rb
    branches/ruby_1_9_2/version.h

Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 30308)
+++ ruby_1_9_2/ChangeLog	(revision 30309)
@@ -1,3 +1,8 @@
+Sun Dec  5 11:27:08 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* ruby.c (load_file_internal): decrement for ungotten line.
+	  [ruby-dev:42680]
+
 Fri Dec  3 07:08:42 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/stringio/stringio.c (strio_getline): round upto next char
Index: ruby_1_9_2/version.h
===================================================================
--- ruby_1_9_2/version.h	(revision 30308)
+++ ruby_1_9_2/version.h	(revision 30309)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.2"
-#define RUBY_PATCHLEVEL 114
+#define RUBY_PATCHLEVEL 115
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1
Index: ruby_1_9_2/ruby.c
===================================================================
--- ruby_1_9_2/ruby.c	(revision 30308)
+++ ruby_1_9_2/ruby.c	(revision 30309)
@@ -1536,6 +1536,7 @@
 	rb_funcall(f, set_encoding, 1, rb_enc_from_encoding(enc));
 
 	if (opt->xflag) {
+	    line_start--;
 	  search_shebang:
 	    forbid_setid("-x");
 	    opt->xflag = FALSE;
Index: ruby_1_9_2/test/ruby/test_rubyoptions.rb
===================================================================
--- ruby_1_9_2/test/ruby/test_rubyoptions.rb	(revision 30308)
+++ ruby_1_9_2/test/ruby/test_rubyoptions.rb	(revision 30309)
@@ -271,6 +271,12 @@
       assert_equal("\"\u3042\"", r.join.force_encoding(Encoding::UTF_8))
       assert_equal([], e)
     end
+
+    bug4118 = '[ruby-dev:42680]'
+    assert_in_out_err(%w[], "#!/bin/sh\n""#!shebang\n""#!ruby\n""puts __LINE__\n",
+                      %w[4], [], bug4118)
+    assert_in_out_err(%w[-x], "#!/bin/sh\n""#!shebang\n""#!ruby\n""puts __LINE__\n",
+                      %w[4], [], bug4118)
   end
 
   def test_sflag

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]