Skip to content

Commit fbb3021

Browse files
committed
Rename suppress warnings to verbose
1 parent 7906695 commit fbb3021

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ext/prism/extension.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ID rb_option_id_filepath;
2222
ID rb_option_id_encoding;
2323
ID rb_option_id_line;
2424
ID rb_option_id_frozen_string_literal;
25-
ID rb_option_id_suppress_warnings;
25+
ID rb_option_id_verbose;
2626
ID rb_option_id_scopes;
2727

2828
/******************************************************************************/
@@ -130,8 +130,8 @@ build_options_i(VALUE key, VALUE value, VALUE argument) {
130130
if (!NIL_P(value)) pm_options_line_set(options, NUM2UINT(value));
131131
} else if (key_id == rb_option_id_frozen_string_literal) {
132132
if (!NIL_P(value)) pm_options_frozen_string_literal_set(options, value == Qtrue);
133-
} else if (key_id == rb_option_id_suppress_warnings) {
134-
if (!NIL_P(value)) pm_options_suppress_warnings_set(options, value == Qtrue);
133+
} else if (key_id == rb_option_id_verbose) {
134+
pm_options_suppress_warnings_set(options, value != Qtrue);
135135
} else if (key_id == rb_option_id_scopes) {
136136
if (!NIL_P(value)) build_options_scopes(options, value);
137137
} else {
@@ -626,8 +626,8 @@ parse_input(pm_string_t *input, const pm_options_t *options) {
626626
* integer or nil. Note that this is 1-indexed.
627627
* * `frozen_string_literal` - whether or not the frozen string literal pragma
628628
* has been set. This should be a boolean or nil.
629-
* * `suppress_warnings` - whether or not warnings should be suppressed. This
630-
* should be a boolean or nil.
629+
* * `verbose` - the current level of verbosity. This controls whether or not
630+
* the parser emits warnings. This should be a boolean or nil.
631631
* * `scopes` - the locals that are in scope surrounding the code that is being
632632
* parsed. This should be an array of arrays of symbols or nil.
633633
*/
@@ -947,7 +947,7 @@ Init_prism(void) {
947947
rb_option_id_encoding = rb_intern_const("encoding");
948948
rb_option_id_line = rb_intern_const("line");
949949
rb_option_id_frozen_string_literal = rb_intern_const("frozen_string_literal");
950-
rb_option_id_suppress_warnings = rb_intern_const("suppress_warnings");
950+
rb_option_id_verbose = rb_intern_const("verbose");
951951
rb_option_id_scopes = rb_intern_const("scopes");
952952

953953
/**

lib/prism/ffi.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def dump_options(options)
299299
values << (options.fetch(:frozen_string_literal, false) ? 1 : 0)
300300

301301
template << "C"
302-
values << (options.fetch(:suppress_warnings, false) ? 1 : 0)
302+
values << (options[:verbose] ? 0 : 1)
303303

304304
template << "L"
305305
if (scopes = options[:scopes])

0 commit comments

Comments
 (0)