~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to lib/irb/init.rb

  • Committer: Bazaar Package Importer
  • Author(s): akira yamada
  • Date: 2005-09-21 13:16:19 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050921131619-qhlm5e5pz3bvsh2g
Tags: 1.9.0+20050921-1
* akira yamada <akira@debian.org>
- new upstream snapshot. (2005-09-21)
    - [security] JVN#62914675 CVE-2005-2337
        - preserve safe level in the environment where a method is defined.
        - prohibit calling tainted method (>2) when $SAFE == 0.
- removed debian/patches/802_workaround_for_send.dpatch:
    - the patch is in upstream.
- debian/control: build-depends on libreadline5-dev.  (closes: #326333)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
2
#   irb/init.rb - irb initialize module
3
3
#       $Release Version: 0.9.5$
4
 
#       $Revision: 1.11 $
5
 
#       $Date: 2005/06/07 15:02:31 $
 
4
#       $Revision: 1.14 $
 
5
#       $Date: 2005/08/30 07:22:06 $
6
6
#       by Keiju ISHITSUKA(keiju@ruby-lang.org)
7
7
#
8
8
# --
121
121
    @CONF[:LC_MESSAGES].load("irb/error.rb")
122
122
  end
123
123
 
 
124
  FEATURE_IOPT_CHANGE_VERSION = "1.9.0"
 
125
 
124
126
  # option analyzing
125
127
  def IRB.parse_opts
 
128
    load_path = []
126
129
    while opt = ARGV.shift
127
130
      case opt
128
131
      when "-f"
136
139
        @CONF[:LOAD_MODULES].push opt if opt
137
140
      when /^-I(.+)?/
138
141
        opt = $1 || ARGV.shift
139
 
        $LOAD_PATH.push opt if opt
 
142
        load_path.concat(opt.split(File::PATH_SEPARATOR)) if opt
140
143
      when /^-K(.)/
141
144
        $KCODE = $1
142
145
      when "--inspect"
189
192
        break
190
193
      end
191
194
    end
 
195
    if RUBY_VERSION >= FEATURE_IOPT_CHANGE_VERSION
 
196
      load_path.collect! do |path|
 
197
        /\A\.\// =~ path ? path : File.expand_path(path)
 
198
      end
 
199
    end
 
200
    $LOAD_PATH.unshift(*load_path)
192
201
  end
193
202
 
194
203
  # running config