]> git.wincent.com - wikitext.git/blobdiff - ext/wikitext/wikitext.c
Drop code that only existed to support Rails 2
[wikitext.git] / ext / wikitext / wikitext.c
index 532db5042dc08bc596008d55d79ba92bf0beb321..af026aa0fedea74226b55cdbbde79549b4c58cde 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2008-2013 Wincent Colaiuta. All rights reserved.
+// Copyright 2008-2014 Wincent Colaiuta. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
@@ -68,7 +68,6 @@ void Init_wikitext()
     cWikitextParser = rb_define_class_under(mWikitext, "Parser", rb_cObject);
     rb_define_method(cWikitextParser, "initialize", Wikitext_parser_initialize, -1);
     rb_define_method(cWikitextParser, "parse", Wikitext_parser_parse, -1);
-    rb_define_method(cWikitextParser, "profiling_parse", Wikitext_parser_profiling_parse, 1);
     rb_define_method(cWikitextParser, "tokenize", Wikitext_parser_tokenize, 1);
     rb_define_method(cWikitextParser, "benchmarking_tokenize", Wikitext_parser_benchmarking_tokenize, 1);
     rb_define_method(cWikitextParser, "fulltext_tokenize", Wikitext_parser_fulltext_tokenize, -1);
@@ -111,15 +110,9 @@ void Init_wikitext()
         rb_require("wikitext/nil_class");
         rb_require("wikitext/string");
 
-        // now check for Rails version
         VALUE active_support = rb_const_get(rb_cObject,
             rb_intern("ActiveSupport"));
-        if (rb_respond_to(active_support, rb_intern("on_load")))
-            // running under Rails 3
-            rb_iterate(wikitext_block_forwarder, active_support,
-                wikitext_on_load_block, Qnil);
-        else
-            // running under Rails 2
-            rb_require("wikitext/rails_template_handler");
+        rb_iterate(wikitext_block_forwarder, active_support,
+            wikitext_on_load_block, Qnil);
     }
 }