diff --git a/NEWS b/NEWS index 7812a624..34b2b8c7 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ += RubyMotion 1.36 = + + * Improved detecting file dependencies to accept absolute paths. Thanks to + Clay Allsopp for the patch (pull request #82). + = RubyMotion 1.35 = * Added support for string constants defined in 3rd-party header files diff --git a/Rakefile b/Rakefile index 36f27877..6cfaa0e4 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,4 @@ -PROJECT_VERSION = '1.35' +PROJECT_VERSION = '1.36' PLATFORMS_DIR = (ENV['PLATFORMS_DIR'] || '/Applications/Xcode.app/Contents/Developer/Platforms') sim_sdks = Dir.glob(File.join(PLATFORMS_DIR, 'iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk')).map do |path| diff --git a/lib/motion/project/config.rb b/lib/motion/project/config.rb index 04e1ba4b..0442a5cc 100644 --- a/lib/motion/project/config.rb +++ b/lib/motion/project/config.rb @@ -276,7 +276,7 @@ EOS def files_dependencies(deps_hash) res_path = lambda do |x| - path = /^\./.match(x) ? x : File.join('.', x) + path = /^\.?\//.match(x) ? x : File.join('.', x) unless @files.flatten.include?(path) App.fail "Can't resolve dependency `#{x}'" end diff --git a/test/test/spec/super_spec.rb b/test/test/spec/super_spec.rb new file mode 100644 index 00000000..647bfbb7 --- /dev/null +++ b/test/test/spec/super_spec.rb @@ -0,0 +1,26 @@ +class Base + def bar(args) + $spec_result << args.first + if args = args[1..-1] + obj = Foo.new + obj.bar(args) + end + end +end + +class Foo < Base + def bar(args) + $spec_result << "a" + super + end +end + +$spec_result = [] + +describe "'super'" do + it "should work when calls inherited class method in super method" do + obj = Foo.new + obj.bar(%w{1 2 3}) + $spec_result.should == ["a", "1", "a", "2", "a", "3", "a", nil] + end +end