~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to ext/tk/lib/tk/autoload.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
538
538
          @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
539
539
 
540
540
        else # NOT topalias_defined?(sym)
541
 
          # Nobody controls ALIAS[sym]. 
542
 
          # At leaset, current widget set doesn't control ALIAS[sym]. 
 
541
          # Nobody controls ALIAS[sym].
 
542
          # At leaset, current widget set doesn't control ALIAS[sym].
543
543
          # Keep Object::sym (even if it is not defined)
544
544
          # Keep OWNER[sym].
545
545
          @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
552
552
        @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
553
553
        replace_topalias(sym, obj)
554
554
        replace_topobj(sym, obj)
555
 
        
 
555
 
556
556
      when nil
557
557
        # New definition for sym
558
558
        @TOPLEVEL_ALIAS_OWNER[sym] = target
566
566
        # Keep ALIAS[sym].
567
567
        # Keep OWNER[sym].
568
568
        @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
569
 
        
 
569
 
570
570
      end
571
571
    end
572
572
 
583
583
 
584
584
  def __set_loaded_toplevel_aliases__(autopath, target, obj, *symbols)
585
585
    # autopath is an autoload file
586
 
    # Currently, this method doesn't support that autoload loads 
 
586
    # Currently, this method doesn't support that autoload loads
587
587
    # different toplevels between <basename>.rb and <basename>.so extension.
588
588
    shortpath = (autopath =~ /^(.*)(.rb|.so)$/)? $1: autopath
589
589
    target = target.to_sym