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

ruby-changes:31729

From: tmm1 <ko1@a...>
Date: Sat, 23 Nov 2013 08:50:13 +0900 (JST)
Subject: [ruby-changes:31729] tmm1:r43808 (trunk): * lib/set.rb (class SortedSet): Fix source_location for methods defined via eval.

tmm1	2013-11-23 08:50:06 +0900 (Sat, 23 Nov 2013)

  New Revision: 43808

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

  Log:
    * lib/set.rb (class SortedSet): Fix source_location for methods defined via eval.

  Modified files:
    trunk/ChangeLog
    trunk/lib/set.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43807)
+++ ChangeLog	(revision 43808)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Nov 23 08:23:23 2013  Aman Gupta <ruby@t...>
+
+	* lib/set.rb (class SortedSet): Fix source_location for methods
+	  defined via eval.
+
 Sat Nov 23 03:44:03 2013  Eric Hodel  <drbrain@s...>
 
 	* lib/rubygems:  Update to RubyGems master dcce4ff.  Important changes
Index: lib/set.rb
===================================================================
--- lib/set.rb	(revision 43807)
+++ lib/set.rb	(revision 43808)
@@ -574,7 +574,7 @@ class SortedSet < Set https://github.com/ruby/ruby/blob/trunk/lib/set.rb#L574
       begin
         require 'rbtree'
 
-        module_eval %{
+        module_eval <<-END, __FILE__, __LINE__+1
           def initialize(*args)
             @hash = RBTree.new
             super
@@ -585,9 +585,9 @@ class SortedSet < Set https://github.com/ruby/ruby/blob/trunk/lib/set.rb#L585
             super
           end
           alias << add
-        }
+        END
       rescue LoadError
-        module_eval %{
+        module_eval <<-END, __FILE__, __LINE__+1
           def initialize(*args)
             @keys = nil
             super
@@ -647,7 +647,7 @@ class SortedSet < Set https://github.com/ruby/ruby/blob/trunk/lib/set.rb#L647
             (@keys = @hash.keys).sort! unless @keys
             @keys
           end
-        }
+        END
       end
       module_eval {
         # a hack to shut up warning

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

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