This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Zend/Zend.m4.original 2011-07-12 21:43:51.000000000 -0600 | |
+++ Zend/Zend.m4 2011-07-12 22:57:34.000000000 -0600 | |
@@ -104,6 +104,14 @@ | |
AC_CHECK_FUNCS(finite isfinite isinf isnan) | |
+dnl sevence... | |
+dnl | |
+dnl Floating point environment control | |
+dnl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
z = fn | |
f -> fn | |
x -> f.(fn y -> x.(x).(y) end) | |
end.(fn | |
x -> f.(fn y -> x.(x).(y) end) | |
end) | |
end | |
add_squares = z.(fn | |
f -> fn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class THREE.BoneHelper extends THREE.Object3D | |
constructor: (@bone, @size) -> | |
super() | |
@size ?= 1 | |
cubeGeometry = new THREE.CubeGeometry(@size, @size, @size) | |
cubeMaterial = new THREE.MeshBasicMaterial() | |
@cube = new THREE.Mesh(cubeGeometry, cubeMaterial) | |
@cube.matrixAutoUpdate = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Renderable a where | |
render :: a -> IO () | |
newtype Rectangle = Rectangle { width :: Double, height :: Double } | |
instance Renderable Rectangle where | |
render = undefined | |
newtype Circle = Circle { radius :: Double } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb | |
index 1877869..57f57b6 100644 | |
--- a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb | |
+++ b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb | |
@@ -32,7 +32,7 @@ module ActiveRecord | |
if create_time_zone_conversion_attribute?(attr_name, columns_hash[attr_name]) | |
method_body, line = <<-EOV, __LINE__ + 1 | |
def #{attr_name}=(time) | |
- time_with_zone = time.respond_to?(:in_time_zone) ? time.in_time_zone : nil | |
+ time_with_zone = convert_value_to_time_zone(time) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/activerecord/lib/active_record/connection_adapters/column.rb b/activerecord/lib/active_record/connection_adapters/column.rb | |
index f2fbd5a..5e4e00b 100644 | |
--- a/activerecord/lib/active_record/connection_adapters/column.rb | |
+++ b/activerecord/lib/active_record/connection_adapters/column.rb | |
@@ -13,101 +13,36 @@ module ActiveRecord | |
ISO_DATETIME = /\A(\d{4})-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)(\.\d+)?\z/ | |
end | |
- attr_reader :name, :default, :type, :limit, :null, :sql_type, :precision, :scale, :default_function | |
- attr_accessor :primary, :coder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_relative '../load_paths' | |
require 'active_record' | |
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') | |
class Book < ActiveRecord::Base | |
has_and_belongs_to_many :genres | |
has_many :genre_memberships | |
has_many :genres2, through: :genre_memberships, source: :genre | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/activerecord/lib/active_record/attribute_methods/serialization.rb b/activerecord/lib/active_record/attribute_methods/serialization.rb | |
index 53a9c87..cec50f6 100644 | |
--- a/activerecord/lib/active_record/attribute_methods/serialization.rb | |
+++ b/activerecord/lib/active_record/attribute_methods/serialization.rb | |
@@ -50,150 +50,21 @@ module ActiveRecord | |
# serialize :preferences, Hash | |
# end | |
def serialize(attr_name, class_name_or_coder = Object) | |
- include Behavior | |
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_relative '../load_paths' | |
require 'active_record' | |
require 'active_support/all' | |
Time.zone = ActiveSupport::TimeZone['Central Time (US & Canada)'] | |
ActiveRecord::Base.time_zone_aware_attributes = true | |
ActiveRecord::Base.establish_connection(adapter: :sqlite3, database: ':memory:') | |
class MyModel < ActiveRecord::Base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
has_many :posts | |
end | |
class Post < ActiveRecord::Base | |
belongs_to :user, counter_cache: true | |
end | |
user = User.create | |
user.posts_count # => 0 |
OlderNewer