Created
April 17, 2012 20:52
-
-
Save kbarber/2408979 to your computer and use it in GitHub Desktop.
we allow this?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ken@kb puppet]# cat /tmp/foo2.rb ruby-1.8.7-p352@puppet | |
| require 'puppet' | |
| module Puppet::Parser::Functions | |
| newfunction(:'bad&function', :type => :statement) do |args| | |
| puts "This should not fucking work" | |
| end | |
| end | |
| puts Puppet::Parser::Functions.function("bad&function".to_sym) | |
| scope = Puppet::Parser::Scope.new | |
| scope.send("function_bad&function".to_sym, []) | |
| [ken@kb puppet]# ruby /tmp/foo2.rb ruby-1.8.7-p352@puppet | |
| function_bad&function | |
| This should not fucking work | |
| [ken@kb puppet]# | |
| At least the grammar stops it: | |
| [ken@kb puppet]# ./bin/puppet apply -e 'bad&function()' ruby-1.8.7-p352@puppet | |
| err: Could not parse for environment production: Could not match &function() at line 1 on node kb.local | |
| err: Could not parse for environment production: Could not match &function() at line 1 on node kb.local | |
| [ken@kb puppet]# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment