@@ -23,19 +23,18 @@ class << self
2323 opts = FileUtils . options_of name
2424 default_options = [ ]
2525 if opts . include? ( "verbose" )
26- default_options << ": verbose => FileUtilsExt.verbose_flag"
26+ default_options << "verbose: FileUtilsExt.verbose_flag"
2727 end
2828 if opts . include? ( "noop" )
29- default_options << ": noop => FileUtilsExt.nowrite_flag"
29+ default_options << "noop: FileUtilsExt.nowrite_flag"
3030 end
3131
3232 next if default_options . empty?
3333 module_eval ( <<-EOS , __FILE__ , __LINE__ + 1 )
34- def #{ name } ( *args, &block )
35- super(
36- *rake_merge_option(args,
37- #{ default_options . join ( ', ' ) }
38- ), &block)
34+ def #{ name } (*args, **options, &block)
35+ super(*args,
36+ #{ default_options . join ( ', ' ) } ,
37+ **options, &block)
3938 end
4039 EOS
4140 end
@@ -113,16 +112,6 @@ def when_writing(msg=nil)
113112 end
114113 end
115114
116- # Merge the given options with the default values.
117- def rake_merge_option ( args , defaults )
118- if Hash === args . last
119- defaults . update ( args . last )
120- args . pop
121- end
122- args . push defaults
123- args
124- end
125-
126115 # Send the message to the default rake output (which is $stderr).
127116 def rake_output_message ( message )
128117 $stderr. puts ( message )
0 commit comments