A minimal use case shows that if $::operatingsystemmajrelease is undef (puppet's idea of nil) then this will happen, because you can't compare undef with comparators. (I include --trace just to show it really is the puppet manifest `<` and not a ruby method `<`)
3.1.1
[root@q2xuk1zrzaqpy3f ~]# puppet apply -e 'if $whatever < 5 {}' --trace
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/parser/ast/comparison_operator.rb:28:in `send'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/parser/ast/comparison_operator.rb:28:in `evaluate'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/parser/ast.rb:62:in `safeevaluate'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/parser/ast/ifstatement.rb:20:in `evaluate'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/parser/ast.rb:62:in `safeevaluate'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/parser/ast/astarray.rb:25:in `evaluate'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/parser/ast/astarray.rb:20:in `each'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/parser/ast/astarray.rb:20:in `evaluate'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/parser/ast.rb:62:in `safeevaluate'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/resource/type.rb:136:in `evaluate_code'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/parser/resource.rb:81:in `evaluate'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/parser/compiler.rb:282:in `evaluate_main'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/parser/compiler.rb:96:in `compile'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/parser/compiler.rb:29:in `compile'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/indirector/catalog/compiler.rb:83:in `compile'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/util.rb:184:in `benchmark'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/indirector/catalog/compiler.rb:81:in `compile'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/indirector/catalog/compiler.rb:41:in `find'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/indirector/indirection.rb:191:in `find'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/application/apply.rb:204:in `main'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/application/apply.rb:146:in `run_command'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/application.rb:364:in `run'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/application.rb:456:in `plugin_hook'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/application.rb:364:in `run'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/util.rb:504:in `exit_on_fail'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/application.rb:364:in `run'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/util/command_line.rb:132:in `run'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/lib/puppet/util/command_line.rb:86:in `execute'
/usr/lib/ruby/gems/1.8/gems/puppet-3.1.1/bin/puppet:4
But... $operatingsystemmajrelease is totally a valid fact on centos6 and facter 1.7.6 that I get when gem installing puppet 3.1.1:
So what version of facter does your vagrant box have? It looks like 1.6 does NOT have this fact, and thus the variable will be undef.