Project

General

Profile

Feature #12882 ยป 0001-Add-uplevel-keyword-to-Kernel-warn-and-use-it.patch

jeremyevans0 (Jeremy Evans), 10/24/2017 10:47 PM

View differences:

error.c
330 330
static VALUE
331 331
rb_warn_m(int argc, VALUE *argv, VALUE exc)
332 332
{
333
    if (!NIL_P(ruby_verbose) && argc > 0) {
333
    VALUE opts, uplevel = Qnil;
334

  
335
    if (!NIL_P(ruby_verbose) && argc > 0 &&
336
	    (argc = rb_scan_args(argc, argv, "*:", NULL, &opts)) > 0) {
334 337
	VALUE str = argv[0];
335
	if (argc > 1 || !end_with_asciichar(str, '\n')) {
336
	    str = rb_str_tmp_new(0);
338
	if (!NIL_P(opts)) {
339
	    static ID kwds[1];
340
	    if (!kwds[0]) {
341
		CONST_ID(kwds[0], "uplevel");
342
	    }
343
	    rb_get_kwargs(opts, kwds, 0, 1, &uplevel);
344
	    if (uplevel == Qundef) {
345
		uplevel = Qnil;
346
	    }
347
	    else if (!NIL_P(uplevel)) {
348
		uplevel = LONG2NUM((long)NUM2ULONG(uplevel) + 1);
349
		uplevel = rb_vm_thread_backtrace_locations(1, &uplevel, GET_THREAD()->self);
350
		if (!NIL_P(uplevel)) {
351
		    uplevel = rb_ary_entry(uplevel, 0);
352
		}
353
	    }
354
	}
355
	if (argc > 1 || !NIL_P(uplevel) || !end_with_asciichar(str, '\n')) {
356
	    if (NIL_P(uplevel)) {
357
		str = rb_str_tmp_new(0);
358
	    }
359
	    else {
360
		VALUE path;
361
		path = rb_funcall(uplevel, rb_intern("path"), 0);
362
		str = rb_sprintf("%s:%li: warning: ",
363
		    rb_string_value_ptr(&path),
364
		    NUM2LONG(rb_funcall(uplevel, rb_intern("lineno"), 0)));
365
	    }
337 366
	    RBASIC_SET_CLASS(str, rb_cWarningBuffer);
338 367
	    rb_io_puts(argc, argv, str);
339 368
	    RBASIC_SET_CLASS(str, rb_cString);
lib/cgi/core.rb
267 267
  def _header_for_modruby(buf)  #:nodoc:
268 268
    request = Apache::request
269 269
    buf.scan(/([^:]+): (.+)#{EOL}/o) do |name, value|
270
      warn sprintf("name:%s value:%s\n", name, value) if $DEBUG
270
      $stderr.puts sprintf("name:%s value:%s\n", name, value) if $DEBUG
271 271
      case name
272 272
      when 'Set-Cookie'
273 273
        request.headers_out.add(name, value)
lib/cmath.rb
50 50
    atanh
51 51
  ].each do |meth|
52 52
    define_method(meth + '!') do |*args, &block|
53
      warn("CMath##{meth}! is deprecated; use CMath##{meth} or Math##{meth}") if $VERBOSE
53
      warn("CMath##{meth}! is deprecated; use CMath##{meth} or Math##{meth}", uplevel: 1) if $VERBOSE
54 54
      RealMath.send(meth, *args, &block)
55 55
    end
56 56
  end
lib/delegate.rb
97 97
    target = self.__getobj__ {r = false}
98 98
    r &&= target.respond_to?(m, include_private)
99 99
    if r && include_private && !target.respond_to?(m, false)
100
      warn "#{caller(3, 1)[0]}: delegator does not forward private method \##{m}"
100
      warn "delegator does not forward private method \##{m}", uplevel: 3
101 101
      return false
102 102
    end
103 103
    r
lib/drb/ssl.rb
336 336
      end
337 337
      self.class.new(uri, ssl, @config, true)
338 338
      rescue OpenSSL::SSL::SSLError
339
        warn("#{__FILE__}:#{__LINE__}: warning: #{$!.message} (#{$!.class})") if @config[:verbose]
339
        warn("#{$!.message} (#{$!.class})", uplevel: 0) if @config[:verbose]
340 340
        retry
341 341
      end
342 342
    end
lib/forwardable.rb
206 206
      method_call = "#{<<-"begin;"}\n#{<<-"end;".chomp}"
207 207
        begin;
208 208
          unless defined? _.#{method}
209
            ::Kernel.warn "\#{caller_locations(1)[0]}: "#{mesg.dump}"\#{_.class}"'##{method}'
209
            ::Kernel.warn #{mesg.dump}"\#{_.class}"'##{method}', uplevel: 1
210 210
            _#{method_call}
211 211
          else
212 212
            _.#{method}(*args, &block)
lib/ipaddr.rb
310 310

  
311 311
  # Returns true if the ipaddr is an IPv4-compatible IPv6 address.
312 312
  def ipv4_compat?
313
    warn "#{caller(1, 1)[0]}: warning: IPAddr\##{__callee__} is obsolete" if $VERBOSE
313
    warn "IPAddr\##{__callee__} is obsolete", uplevel: 1 if $VERBOSE
314 314
    _ipv4_compat?
315 315
  end
316 316

  
......
336 336
  # Returns a new ipaddr built by converting the native IPv4 address
337 337
  # into an IPv4-compatible IPv6 address.
338 338
  def ipv4_compat
339
    warn "#{caller(1, 1)[0]}: warning: IPAddr\##{__callee__} is obsolete" if $VERBOSE
339
    warn "IPAddr\##{__callee__} is obsolete", uplevel: 1 if $VERBOSE
340 340
    if !ipv4?
341 341
      raise InvalidAddressError, "not an IPv4 address"
342 342
    end
lib/irb/init.rb
277 277
      begin
278 278
        require m
279 279
      rescue LoadError => err
280
        warn err.backtrace[0] << ":#{err.class}: #{err}"
280
        warn ":#{err.class}: #{err}", uplevel: 0
281 281
      end
282 282
    end
283 283
  end
lib/irb/locale.rb
31 31
        if @encoding_name
32 32
          begin load 'irb/encoding_aliases.rb'; rescue LoadError; end
33 33
          if @encoding = @@legacy_encoding_alias_map[@encoding_name]
34
            warn "%s is obsolete. use %s" % ["#{@lang}_#{@territory}.#{@encoding_name}", "#{@lang}_#{@territory}.#{@encoding.name}"]
34
            warn(("%s is obsolete. use %s" % ["#{@lang}_#{@territory}.#{@encoding_name}", "#{@lang}_#{@territory}.#{@encoding.name}"]), uplevel: 1)
35 35
          end
36 36
          @encoding = Encoding.find(@encoding_name) rescue nil
37 37
        end
lib/matrix.rb
1246 1246
  # deprecated; use Matrix#determinant
1247 1247
  #
1248 1248
  def determinant_e
1249
    warn "#{caller(1, 1)[0]}: warning: Matrix#determinant_e is deprecated; use #determinant"
1249
    warn "Matrix#determinant_e is deprecated; use #determinant", uplevel: 1
1250 1250
    determinant
1251 1251
  end
1252 1252
  alias det_e determinant_e
......
1304 1304
  # deprecated; use Matrix#rank
1305 1305
  #
1306 1306
  def rank_e
1307
    warn "#{caller(1, 1)[0]}: warning: Matrix#rank_e is deprecated; use #rank"
1307
    warn "Matrix#rank_e is deprecated; use #rank", uplevel: 1
1308 1308
    rank
1309 1309
  end
1310 1310

  
......
1490 1490
  end
1491 1491

  
1492 1492
  def elements_to_f
1493
    warn "#{caller(1, 1)[0]}: warning: Matrix#elements_to_f is deprecated, use map(&:to_f)"
1493
    warn "Matrix#elements_to_f is deprecated, use map(&:to_f)", uplevel: 1
1494 1494
    map(&:to_f)
1495 1495
  end
1496 1496

  
1497 1497
  def elements_to_i
1498
    warn "#{caller(1, 1)[0]}: warning: Matrix#elements_to_i is deprecated, use map(&:to_i)"
1498
    warn "Matrix#elements_to_i is deprecated, use map(&:to_i)", uplevel: 1
1499 1499
    map(&:to_i)
1500 1500
  end
1501 1501

  
1502 1502
  def elements_to_r
1503
    warn "#{caller(1, 1)[0]}: warning: Matrix#elements_to_r is deprecated, use map(&:to_r)"
1503
    warn "Matrix#elements_to_r is deprecated, use map(&:to_r)", uplevel: 1
1504 1504
    map(&:to_r)
1505 1505
  end
1506 1506

  
......
2142 2142
  end
2143 2143

  
2144 2144
  def elements_to_f
2145
    warn "#{caller(1, 1)[0]}: warning: Vector#elements_to_f is deprecated"
2145
    warn "Vector#elements_to_f is deprecated", uplevel: 1
2146 2146
    map(&:to_f)
2147 2147
  end
2148 2148

  
2149 2149
  def elements_to_i
2150
    warn "#{caller(1, 1)[0]}: warning: Vector#elements_to_i is deprecated"
2150
    warn "Vector#elements_to_i is deprecated", uplevel: 1
2151 2151
    map(&:to_i)
2152 2152
  end
2153 2153

  
2154 2154
  def elements_to_r
2155
    warn "#{caller(1, 1)[0]}: warning: Vector#elements_to_r is deprecated"
2155
    warn "Vector#elements_to_r is deprecated", uplevel: 1
2156 2156
    map(&:to_r)
2157 2157
  end
2158 2158

  
lib/net/ftp.rb
310 310

  
311 311
    # Obsolete
312 312
    def return_code # :nodoc:
313
      $stderr.puts("warning: Net::FTP#return_code is obsolete and do nothing")
313
      warn("Net::FTP#return_code is obsolete and do nothing", uplevel: 1)
314 314
      return "\n"
315 315
    end
316 316

  
317 317
    # Obsolete
318 318
    def return_code=(s) # :nodoc:
319
      $stderr.puts("warning: Net::FTP#return_code= is obsolete and do nothing")
319
      warn("Net::FTP#return_code= is obsolete and do nothing", uplevel: 1)
320 320
    end
321 321

  
322 322
    # Constructs a socket with +host+ and +port+.
lib/net/http.rb
708 708
    #   http.start { .... }
709 709
    #
710 710
    def set_debug_output(output)
711
      warn 'Net::HTTP#set_debug_output called after HTTP started' if started?
711
      warn 'Net::HTTP#set_debug_output called after HTTP started', uplevel: 1 if started?
712 712
      @debug_output = output
713 713
    end
714 714

  
lib/net/http/generic_request.rb
82 82
  end
83 83

  
84 84
  def body_exist?
85
    warn "Net::HTTPRequest#body_exist? is obsolete; use response_body_permitted?" if $VERBOSE
85
    warn "Net::HTTPRequest#body_exist? is obsolete; use response_body_permitted?", uplevel: 1 if $VERBOSE
86 86
    response_body_permitted?
87 87
  end
88 88

  
......
299 299

  
300 300
  def supply_default_content_type
301 301
    return if content_type()
302
    warn 'net/http: warning: Content-Type did not set; using application/x-www-form-urlencoded' if $VERBOSE
302
    warn 'net/http: Content-Type did not set; using application/x-www-form-urlencoded', uplevel: 1 if $VERBOSE
303 303
    set_content_type 'application/x-www-form-urlencoded'
304 304
  end
305 305

  
lib/net/http/header.rb
14 14
    @header = {}
15 15
    return unless initheader
16 16
    initheader.each do |key, value|
17
      warn "net/http: warning: duplicated HTTP header: #{key}" if key?(key) and $VERBOSE
17
      warn "net/http: duplicated HTTP header: #{key}", uplevel: 1 if key?(key) and $VERBOSE
18 18
      if value.nil?
19
        warn "net/http: warning: nil HTTP header: #{key}" if $VERBOSE
19
        warn "net/http: nil HTTP header: #{key}", uplevel: 1 if $VERBOSE
20 20
      else
21 21
        @header[key.downcase] = [value.strip]
22 22
      end
lib/net/http/response.rb
140 140
  #
141 141

  
142 142
  def response   #:nodoc:
143
    warn "#{caller(1, 1)[0]}: warning: Net::HTTPResponse#response is obsolete" if $VERBOSE
143
    warn "Net::HTTPResponse#response is obsolete", uplevel: 1 if $VERBOSE
144 144
    self
145 145
  end
146 146

  
147 147
  def header   #:nodoc:
148
    warn "#{caller(1, 1)[0]}: warning: Net::HTTPResponse#header is obsolete" if $VERBOSE
148
    warn "Net::HTTPResponse#header is obsolete", uplevel: 1 if $VERBOSE
149 149
    self
150 150
  end
151 151

  
152 152
  def read_header   #:nodoc:
153
    warn "#{caller(1, 1)[0]}: warning: Net::HTTPResponse#read_header is obsolete" if $VERBOSE
153
    warn "Net::HTTPResponse#read_header is obsolete", uplevel: 1 if $VERBOSE
154 154
    self
155 155
  end
156 156

  
lib/net/imap.rb
2032 2032
      # generate a warning message to +stderr+, then return
2033 2033
      # the value of +subtype+.
2034 2034
      def media_subtype
2035
        $stderr.printf("warning: media_subtype is obsolete.\n")
2036
        $stderr.printf("         use subtype instead.\n")
2035
        warn("media_subtype is obsolete, use subtype instead.\n", uplevel: 1)
2037 2036
        return subtype
2038 2037
      end
2039 2038
    end
......
2060 2059
      # generate a warning message to +stderr+, then return
2061 2060
      # the value of +subtype+.
2062 2061
      def media_subtype
2063
        $stderr.printf("warning: media_subtype is obsolete.\n")
2064
        $stderr.printf("         use subtype instead.\n")
2062
        warn("media_subtype is obsolete, use subtype instead.\n", uplevel: 1)
2065 2063
        return subtype
2066 2064
      end
2067 2065
    end
......
2090 2088
      # generate a warning message to +stderr+, then return
2091 2089
      # the value of +subtype+.
2092 2090
      def media_subtype
2093
        $stderr.printf("warning: media_subtype is obsolete.\n")
2094
        $stderr.printf("         use subtype instead.\n")
2091
        warn("media_subtype is obsolete, use subtype instead.\n", uplevel: 1)
2095 2092
        return subtype
2096 2093
      end
2097 2094
    end
......
2151 2148
      # generate a warning message to +stderr+, then return
2152 2149
      # the value of +subtype+.
2153 2150
      def media_subtype
2154
        $stderr.printf("warning: media_subtype is obsolete.\n")
2155
        $stderr.printf("         use subtype instead.\n")
2151
        warn("media_subtype is obsolete, use subtype instead.\n", uplevel: 1)
2156 2152
        return subtype
2157 2153
      end
2158 2154
    end
lib/ostruct.rb
162 162
  end
163 163
  private :modifiable?
164 164

  
165
  # ::Kernel.warn("#{caller(1, 1)[0]}: do not use OpenStruct#modifiable")
165
  # ::Kernel.warn("do not use OpenStruct#modifiable", uplevel: 1)
166 166
  alias modifiable modifiable? # :nodoc:
167 167
  protected :modifiable
168 168

  
......
181 181
  end
182 182
  private :new_ostruct_member!
183 183

  
184
  # ::Kernel.warn("#{caller(1, 1)[0]}: do not use OpenStruct#new_ostruct_member")
184
  # ::Kernel.warn("do not use OpenStruct#new_ostruct_member", uplevel: 1)
185 185
  alias new_ostruct_member new_ostruct_member! # :nodoc:
186 186
  protected :new_ostruct_member
187 187

  
lib/rexml/cdata.rb
58 58
    #  c = CData.new( " Some text " )
59 59
    #  c.write( $stdout )     #->  <![CDATA[ Some text ]]>
60 60
    def write( output=$stdout, indent=-1, transitive=false, ie_hack=false )
61
      Kernel.warn( "#{self.class.name}.write is deprecated" )
61
      Kernel.warn( "#{self.class.name}.write is deprecated", uplevel: 1)
62 62
      indent( output, indent )
63 63
      output << START
64 64
      output << @string
lib/rexml/comment.rb
48 48
    # ie_hack::
49 49
    #    Needed for conformity to the child API, but not used by this class.
50 50
    def write( output, indent=-1, transitive=false, ie_hack=false )
51
      Kernel.warn("Comment.write is deprecated.  See REXML::Formatters")
51
      Kernel.warn("Comment.write is deprecated.  See REXML::Formatters", uplevel: 1)
52 52
      indent( output, indent )
53 53
      output << START
54 54
      output << @string
lib/rexml/element.rb
710 710
    #  doc.write( out )     #-> doc is written to the string 'out'
711 711
    #  doc.write( $stdout ) #-> doc written to the console
712 712
    def write(output=$stdout, indent=-1, transitive=false, ie_hack=false)
713
      Kernel.warn("#{self.class.name}.write is deprecated.  See REXML::Formatters")
713
      Kernel.warn("#{self.class.name}.write is deprecated.  See REXML::Formatters", uplevel: 1)
714 714
      formatter = if indent > -1
715 715
          if transitive
716 716
            require "rexml/formatters/transitive"
lib/rexml/instruction.rb
43 43
    # See the rexml/formatters package
44 44
    #
45 45
    def write writer, indent=-1, transitive=false, ie_hack=false
46
      Kernel.warn( "#{self.class.name}.write is deprecated" )
46
      Kernel.warn( "#{self.class.name}.write is deprecated", uplevel: 1)
47 47
      indent(writer, indent)
48 48
      writer << START.sub(/\\/u, '')
49 49
      writer << @target
lib/rexml/node.rb
26 26
    #   REXML::Formatters package for changing the output style.
27 27
    def to_s indent=nil
28 28
      unless indent.nil?
29
        Kernel.warn( "#{self.class.name}.to_s(indent) parameter is deprecated" )
29
        Kernel.warn( "#{self.class.name}.to_s(indent) parameter is deprecated", uplevel: 1)
30 30
        f = REXML::Formatters::Pretty.new( indent )
31 31
        f.write( self, rv = "" )
32 32
      else
lib/rexml/text.rb
293 293
    # See REXML::Formatters
294 294
    #
295 295
    def write( writer, indent=-1, transitive=false, ie_hack=false )
296
      Kernel.warn("#{self.class.name}.write is deprecated.  See REXML::Formatters")
296
      Kernel.warn("#{self.class.name}.write is deprecated.  See REXML::Formatters", uplevel: 1)
297 297
      formatter = if indent > -1
298 298
          REXML::Formatters::Pretty.new( indent )
299 299
        else
lib/rss/rss.rb
596 596

  
597 597
      def #{accessor_name}=(*args)
598 598
        receiver = self.class.name
599
        warn("Warning:\#{caller.first.sub(/:in `.*'\z/, '')}: " \
600
             "Don't use `\#{receiver}\##{accessor_name} = XXX'/" \
599
        warn("Don't use `\#{receiver}\##{accessor_name} = XXX'/" \
601 600
             "`\#{receiver}\#set_#{accessor_name}(XXX)'. " \
602 601
             "Those APIs are not sense of Ruby. " \
603
             "Use `\#{receiver}\##{plural_name} << XXX' instead of them.")
602
             "Use `\#{receiver}\##{plural_name} << XXX' instead of them.", uplevel: 1)
604 603
        if args.size == 1
605 604
          @#{accessor_name}.push(args[0])
606 605
        else
lib/tempfile.rb
124 124
  # If Tempfile.new cannot find a unique filename within a limited
125 125
  # number of tries, then it will raise an exception.
126 126
  def initialize(basename="", tmpdir=nil, mode: 0, **options)
127
    warn "Tempfile.new doesn't call the given block." if block_given?
127
    warn "Tempfile.new doesn't call the given block.", uplevel: 1 if block_given?
128 128

  
129 129
    @unlinked = false
130 130
    @mode = mode|File::RDWR|File::CREAT|File::EXCL
......
250 250
    def call(*args)
251 251
      return if @pid != Process.pid
252 252

  
253
      warn "removing #{@tmpfile.path}..." if $DEBUG
253
      $stderr.puts "removing #{@tmpfile.path}..." if $DEBUG
254 254

  
255 255
      @tmpfile.close
256 256
      begin
......
258 258
      rescue Errno::ENOENT
259 259
      end
260 260

  
261
      warn "done" if $DEBUG
261
      $stderr.puts "done" if $DEBUG
262 262
    end
263 263
  end
264 264

  
lib/timeout.rb
118 118
end
119 119

  
120 120
def timeout(*args, &block)
121
  warn "#{caller_locations(1, 1)[0]}: Object##{__method__} is deprecated, use Timeout.timeout instead."
121
  warn "Object##{__method__} is deprecated, use Timeout.timeout instead.", uplevel: 1
122 122
  Timeout.timeout(*args, &block)
123 123
end
124 124

  
lib/uri/common.rb
100 100
    #   # => "@%3F@%21"
101 101
    #
102 102
    def escape(*arg)
103
      warn "#{caller(1, 1)[0]}: warning: URI.escape is obsolete" if $VERBOSE
103
      warn "URI.escape is obsolete", uplevel: 1 if $VERBOSE
104 104
      DEFAULT_PARSER.escape(*arg)
105 105
    end
106 106
    alias encode escape
......
132 132
    #   # => "http://example.com/?a=\t\r"
133 133
    #
134 134
    def unescape(*arg)
135
      warn "#{caller(1, 1)[0]}: warning: URI.unescape is obsolete" if $VERBOSE
135
      warn "URI.unescape is obsolete", uplevel: 1 if $VERBOSE
136 136
      DEFAULT_PARSER.unescape(*arg)
137 137
    end
138 138
    alias decode unescape
......
300 300
  #   # => ["http://foo.example.com/bla", "mailto:test@example.com"]
301 301
  #
302 302
  def self.extract(str, schemes = nil, &block)
303
    warn "#{caller(1, 1)[0]}: warning: URI.extract is obsolete" if $VERBOSE
303
    warn "URI.extract is obsolete", uplevel: 1 if $VERBOSE
304 304
    DEFAULT_PARSER.extract(str, schemes, &block)
305 305
  end
306 306

  
......
336 336
  #   end
337 337
  #
338 338
  def self.regexp(schemes = nil)
339
    warn "#{caller(1, 1)[0]}: warning: URI.regexp is obsolete" if $VERBOSE
339
    warn "URI.regexp is obsolete", uplevel: 1 if $VERBOSE
340 340
    DEFAULT_PARSER.make_regexp(schemes)
341 341
  end
342 342

  
lib/uri/generic.rb
1517 1517
      elsif name == 'http_proxy'
1518 1518
        unless proxy_uri = env[name]
1519 1519
          if proxy_uri = env[name.upcase]
1520
            warn 'The environment variable HTTP_PROXY is discouraged.  Use http_proxy.'
1520
            warn 'The environment variable HTTP_PROXY is discouraged.  Use http_proxy.', uplevel: 1
1521 1521
          end
1522 1522
        end
1523 1523
      else
lib/webrick/server.rb
103 103
      @shutdown_pipe = nil
104 104
      unless @config[:DoNotListen]
105 105
        if @config[:Listen]
106
          warn(":Listen option is deprecated; use GenericServer#listen")
106
          warn(":Listen option is deprecated; use GenericServer#listen", uplevel: 1)
107 107
        end
108 108
        listen(@config[:BindAddress], @config[:Port])
109 109
        if @config[:Port] == 0
lib/webrick/utils.rb
37 37
        Process::Sys::setgid(pw.gid)
38 38
        Process::Sys::setuid(pw.uid)
39 39
      else
40
        warn("WEBrick::Utils::su doesn't work on this platform")
40
        warn("WEBrick::Utils::su doesn't work on this platform", uplevel: 1)
41 41
      end
42 42
    end
43 43
    module_function :su
lib/yaml.rb
5 5
begin
6 6
  require 'psych'
7 7
rescue LoadError
8
  warn "#{caller[0]}:"
9
  warn "It seems your ruby installation is missing psych (for YAML output)."
10
  warn "To eliminate this warning, please install libyaml and reinstall your ruby."
8
  warn "It seems your ruby installation is missing psych (for YAML output).\n" \
9
    "To eliminate this warning, please install libyaml and reinstall your ruby.\n",
10
    uplevel: 1
11 11
  raise
12 12
end
13 13

  
test/ruby/test_exception.rb
1003 1003
    assert_equal(["\n"],     capture_warning_warn {warn ""})
1004 1004
  end
1005 1005

  
1006
  def test_kernel_warn_uplevel
1007
    warning = capture_warning_warn {warn("test warning", uplevel: 0)}
1008
    assert_equal("#{__FILE__}:#{__LINE__-1}: warning: test warning\n", warning[0])
1009
  end
1010

  
1006 1011
  def test_warning_warn_invalid_argument
1007 1012
    assert_raise(TypeError) do
1008 1013
      ::Warning.warn nil
1009
-