summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting/macros.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/redmine/wiki_formatting/macros.rb')
-rw-r--r--lib/redmine/wiki_formatting/macros.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/redmine/wiki_formatting/macros.rb b/lib/redmine/wiki_formatting/macros.rb
index 61218d93a..a2acd07eb 100644
--- a/lib/redmine/wiki_formatting/macros.rb
+++ b/lib/redmine/wiki_formatting/macros.rb
@@ -84,7 +84,7 @@ module Redmine
# end
# end
def register(&block)
- class_eval(&block) if block_given?
+ class_eval(&block) if block
end
# Defines a new macro with the given name, options and block.
@@ -154,7 +154,7 @@ module Redmine
unless /\A\w+\z/.match?(name.to_s)
raise "Invalid macro name: #{name} (only 0-9, A-Z, a-z and _ characters are accepted)"
end
- unless block_given?
+ unless block
raise "Can not create a macro without a block!"
end