Remove support for versions of Ruby before 2.0 (as Rubylang doesn’t even support them anymore)

This commit is contained in:
Mark VanderVoord
2017-03-20 16:18:09 -04:00
parent 06b9f23054
commit dd791fe407
7 changed files with 9 additions and 21 deletions
-3
View File
@@ -13,9 +13,6 @@
"cmock_generator_utils",
"cmock_unityhelper_parser"].each {|req| require "#{File.expand_path(File.dirname(__FILE__))}/#{req}"}
$QUICK_RUBY_VERSION = RUBY_VERSION.split('.').inject(0){|vv,v| vv * 100 + v.to_i }
class CMock
def initialize(options=nil)
+1 -1
View File
@@ -48,7 +48,7 @@ class CMockHeaderParser
def import_source(source)
# let's clean up the encoding in case they've done anything weird with the characters we might find
source = source.force_encoding("ISO-8859-1").encode("utf-8", :replace => nil) if ($QUICK_RUBY_VERSION > 10900)
source = source.force_encoding("ISO-8859-1").encode("utf-8", :replace => nil)
# void must be void for cmock _ExpectAndReturn calls to process properly, not some weird typedef which equates to void
# to a certain extent, this action assumes we're chewing on pre-processed header files, otherwise we'll most likely just get stuff from @treat_as_void