lib/rouge/context.rb in rouge-lang-0.0.6 vs lib/rouge/context.rb in rouge-lang-0.0.7
- old
+ new
@@ -208,9 +208,21 @@
fun.fetch(args[0]) { default }
else
raise ArgumentError,
"Wrong number of args (#{num_args}) passed to ruby/Hash"
end
+ when Set
+ if num_args == 1
+ el = args[0]
+ if fun.include? el
+ el
+ else
+ nil
+ end
+ else
+ raise ArgumentError,
+ "Wrong number of args (#{num_args}) passed to ruby/Set"
+ end
else
fun.call(*args, &block)
end
end