1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Don't print warnings when -q is set.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2006-06-14 22:19:36 +00:00
parent cbb83fbf67
commit 07b132f742
2 changed files with 15 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Wed Jun 14 15:01:09 2006 Eric Hodel <drbrain@segment7.net>
* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser#warn): Don't print
warnings when -q is set.
Wed Jun 14 23:03:53 2006 Tanaka Akira <akr@m17n.org>
* configure.in: check sizeof(rlim_t).

View file

@ -1426,16 +1426,23 @@ module RDoc
private
def warn(msg)
def make_message(msg)
prefix = "\n" + @input_file_name + ":"
if @scanner
prefix << "#{@scanner.line_no}:#{@scanner.char_no}: "
end
$stderr.puts prefix + msg
return prefix + msg
end
def warn(msg)
return if @options.quiet
msg = make_message msg
$stderr.puts msg
end
def error(msg)
warn msg
msg = make_message msg
$stderr.puts msg
exit(1)
end