Permalink
Browse files

Fixed examples to use '#!/usr/bin/env ruby'.

'#!/bin/env ruby' doesn't work on Mac.

Also fixed a NameError in load_music.rb, due to FFI API changes.
  • Loading branch information...
1 parent 65d41d2 commit 60e2eb57f182dbf62235d572e1cb714f7fce56a5 @jacius committed Aug 8, 2010
Showing with 3 additions and 3 deletions.
  1. +1 −1 examples/load_image.rb
  2. +2 −2 examples/load_music.rb
View
@@ -1,4 +1,4 @@
-#!/bin/env ruby
+#!/usr/bin/env ruby
#
# A simple example script using Ruby-SDL-FFI to load and display
View
@@ -1,4 +1,4 @@
-#!/bin/env ruby
+#!/usr/bin/env ruby
require "ruby-sdl-ffi"
@@ -31,7 +31,7 @@
# Load music
music = SDL::Mixer::LoadMUS( path )
-if( music.to_ptr.kind_of? FFI::NullPointer )
+if( music.to_ptr.null? )
puts "ERROR: Could not load music: #{SDL::GetError()}"
exit 1
end

0 comments on commit 60e2eb5

Please sign in to comment.