mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/set.rb (class SortedSet): Fix source_location for methods defined via eval.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e8e18cff7a
commit
cac4da9858
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Nov 23 08:23:23 2013 Aman Gupta <ruby@tmm1.net>
|
||||
|
||||
* lib/set.rb (class SortedSet): Fix source_location for methods
|
||||
defined via eval.
|
||||
|
||||
Sat Nov 23 03:44:03 2013 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* lib/rubygems: Update to RubyGems master dcce4ff. Important changes
|
||||
|
|
|
@ -574,7 +574,7 @@ class SortedSet < Set
|
|||
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
|
|||
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
|
|||
(@keys = @hash.keys).sort! unless @keys
|
||||
@keys
|
||||
end
|
||||
}
|
||||
END
|
||||
end
|
||||
module_eval {
|
||||
# a hack to shut up warning
|
||||
|
|
Loading…
Reference in a new issue