lib/tracelines.rb in linecache-tf-0.45 vs lib/tracelines.rb in linecache-tf-1.0

- old
+ new

@@ -1,8 +1,9 @@ #!/usr/bin/env ruby -# $Id: tracelines.rb 182 2009-10-18 23:47:37Z rockyb $ -# Copyright (C) 2007, 2008, 2009 Rocky Bernstein <rockyb@rubyforge.net> +# $Id: tracelines.rb 233 2010-12-18 23:12:20Z rockyb $ +# Copyright (C) 2007, 2008, 2009, 2010 +# Rocky Bernstein <rockyb@rubyforge.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. @@ -18,11 +19,11 @@ # 02110-1301 USA. require 'thread_frame' module TraceLineNumbers - def lnums_for_iseq(iseq, uniq=true) - lnums = iseq.child_iseqs.map { |iseq| + def lnums_for_iseq(orig_iseq, uniq=true) + lnums = orig_iseq.child_iseqs.map { |iseq| iseq.offsetlines.values.flatten }.flatten.sort uniq ? lnums.uniq : lnums end module_function :lnums_for_iseq