Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

! Ruby 1.9.3

  • Loading branch information...
commit b8af75221440e5a2b9cd01395a62cc6f91a227be 1 parent e2df925
@floere authored
View
5 Gemfile
@@ -0,0 +1,5 @@
+source "https://rubygems.org"
+
+gem 'gosu'
+gem 'chipmunk'
+gem 'activesupport', '~> 2.3.14'
View
14 Gemfile.lock
@@ -0,0 +1,14 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ activesupport (2.3.14)
+ chipmunk (5.3.4.5)
+ gosu (0.7.41)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ activesupport (~> 2.3.14)
+ chipmunk
+ gosu
View
2  examples/cern_horror/lib/units/player.rb
@@ -19,7 +19,7 @@ class Player < Thing
attr_accessor :souls_saved
def initialize *args
- super
+ super *args
self.souls_saved = 0
end
View
6 gem/lib/core/collision.rb
@@ -3,7 +3,7 @@ class Collision
# Default collision functions
#
None = nil # do not collide
- Simple = lambda {} # just collide
+ Simple = lambda { |arbiter| } # just collide
# Kill = lambda { kill! }
# Damage = lambda { damage! }
@@ -34,7 +34,7 @@ def package definition
#
#
def simple_package definition
- lambda do |this_shape, _|
+ lambda do |this_shape, _, arbiter|
things.each do |thing|
if thing.shape == this_shape
thing.instance_eval &definition
@@ -47,7 +47,7 @@ def simple_package definition
#
#
def complex_package definition
- lambda do |this_shape, that_shape|
+ lambda do |this_shape, that_shape, arbiter|
this_that = Array.new 2
things.each do |thing|
if thing.shape == this_shape
View
2  gem/lib/extensions/module.rb
@@ -1,7 +1,7 @@
class Module
def manual text
- metaclass.send :define_method, :manual! do
+ singleton_class.send :define_method, :manual! do
puts <<-MANUAL
MANUAL FOR #{self}
#{text}
View
3  gem/lib/gosu_extensions.rb
@@ -1,4 +1,5 @@
-require 'rubygems'
+require 'thread'
+Mutex
require 'active_support'
# require 'texplay'
begin
View
2  gem/lib/traits/pod.rb
@@ -27,7 +27,7 @@ module ClassMethods
def holds_attachments
class_inheritable_accessor :prototype_attachments
self.prototype_attachments ||= []
- hook = lambda do
+ hook = lambda do |thing|
self.class.prototype_attachments.each do |type, x, y|
attach type.new(self.window), x, y
end
View
2  gem/lib/traits/user_interface.rb
@@ -21,7 +21,7 @@ def ui x = 20, y = 10, color = Gosu::Color::BLACK, &display
# Call this to dynamically add itself to the ui displaying.
#
def ui x = 20, y = 10, color = Gosu::Color::BLACK, &display
- metaclass.instance_eval do
+ singleton_class.instance_eval do
define_method :draw_ui do
window.font.draw instance_eval(&display), x, y, Layer::UI, 1.0, 1.0, color
end
Please sign in to comment.
Something went wrong with that request. Please try again.