Changeset be0859f for src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/upcase.rb
- Timestamp:
- Jul 31, 2017, 6:42:27 PM (9 years ago)
- Branches:
- 0.5, app-cordova, debian/bullseye, debian/jessie, master
- Children:
- fc9d514
- Parents:
- eb1ccd6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/upcase.rb
reb1ccd6 rbe0859f 1 1 # 2 # upcase.rb 2 # upcase.rb 3 # Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085. 3 4 # 4 5 … … 17 18 ) do |arguments| 18 19 19 raise(Puppet::ParseError, "upcase(): Wrong number of arguments " + 20 "given (#{arguments.size} for 1)") if arguments.size != 1 20 raise(Puppet::ParseError, "upcase(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1 21 21 22 22 value = arguments[0] 23 23 24 24 unless value.is_a?(Array) || value.is_a?(Hash) || value.respond_to?(:upcase) 25 raise(Puppet::ParseError, 'upcase(): Requires an ' + 26 'array, hash or object that responds to upcase in order to work') 25 raise(Puppet::ParseError, 'upcase(): Requires an array, hash or object that responds to upcase in order to work') 27 26 end 28 27
Note:
See TracChangeset
for help on using the changeset viewer.
