Skip to content

Instantly share code, notes, and snippets.

@jballanc
Created September 27, 2010 06:09
Show Gist options
  • Save jballanc/598686 to your computer and use it in GitHub Desktop.
Save jballanc/598686 to your computer and use it in GitHub Desktop.
diff -r -u ./core.rb /Volumes/Data/Users/joshua1/Source/sequel/lib/sequel/core.rb
--- ./core.rb 2010-09-03 03:28:49.000000000 -0700
+++ /Volumes/Data/Users/joshua1/Source/sequel/lib/sequel/core.rb 2010-09-26 23:08:57.000000000 -0700
@@ -188,9 +188,8 @@
# Require all given files which should be in the same or a subdirectory of
# this file. If a subdir is given, assume all files are in that subdir.
- # TODO: This method contains workarounds for <rdar://problem/8391405> and <rdar://problem/8140667>
def self.require(files, subdir=nil)
- Array(files).each{|f| Kernel::require("/System/Library/PrivateFrameworks/PodcastLibrary.framework/Vendor/sequel/#{"#{subdir}/" if subdir}#{f}")}
+ Array(files).each{|f| super("#{File.dirname(__FILE__)}/#{"#{subdir}/" if subdir}#{f}")}
end
# Set whether to set the single threaded mode for all databases by default. By default,
diff -r -u ./dataset/query.rb /Volumes/Data/Users/joshua1/Source/sequel/lib/sequel/dataset/query.rb
--- ./dataset/query.rb 2010-08-31 18:23:54.000000000 -0700
+++ /Volumes/Data/Users/joshua1/Source/sequel/lib/sequel/dataset/query.rb 2010-09-26 23:08:57.000000000 -0700
@@ -48,14 +48,8 @@
# Returns a new clone of the dataset with with the given options merged.
# If the options changed include options in COLUMN_CHANGE_OPTS, the cached
# columns are deleted.
-
- # TODO: Another glorious hack brought to you courtesy of ZSUPER!
- alias :orig_clone :clone
def clone(opts = {})
- # This doesn't work yet...
- # c = super()
- # ...so use this ugly hack
- c = orig_clone
+ c = super()
c.opts = @opts.merge(opts)
c.instance_variable_set(:@columns, nil) if opts.keys.any?{|o| COLUMN_CHANGE_OPTS.include?(o)}
c
diff -r -u ./model/base.rb /Volumes/Data/Users/joshua1/Source/sequel/lib/sequel/model/base.rb
--- ./model/base.rb 2010-08-31 18:23:54.000000000 -0700
+++ /Volumes/Data/Users/joshua1/Source/sequel/lib/sequel/model/base.rb 2010-09-26 23:08:57.000000000 -0700
@@ -603,12 +603,7 @@
# and since a lot of instance methods call class methods,
# this alias makes it so you can use model instead of
# self.class.
- #
- # TODO (<rdar://problem/8151713>) -- This doesn't work right in MacRuby, so define the method instead
- # alias_method :model, :class
- def model
- self.class
- end
+ alias_method :model, :class
# The autoincrementing primary key for this model object. Should be
# overridden if you have a composite primary key with one part of it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment