Skip to content

Instantly share code, notes, and snippets.

View kronos's full-sized avatar
👨‍💻

Ivan Samsonov kronos

👨‍💻
View GitHub Profile
From cdd86270d9696184bd13182635d14a29a4455618 Mon Sep 17 00:00:00 2001
From: Ivan Samsonov <[email protected]>
Date: Thu, 7 Oct 2010 14:31:36 +0400
Subject: [PATCH] Fix String#casecmp. Fixes #518
---
kernel/common/string.rb | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/kernel/common/string.rb b/kernel/common/string.rb
diff --git a/kernel/common/string.rb b/kernel/common/string.rb
index 220bab2..4e175a7 100644
--- a/kernel/common/string.rb
+++ b/kernel/common/string.rb
@@ -1063,9 +1063,9 @@ class String
return find_string(needle, offset)
when Regexp
- if match = needle.match_from(self[offset..-1], 0)
+ if match = needle.match_from(self, offset)
From 561d512870022dc2affc5c6de7e930064cf85212 Mon Sep 17 00:00:00 2001
From: Ivan Samsonov <[email protected]>
Date: Mon, 4 Oct 2010 13:11:06 +0400
Subject: [PATCH 1/2] Add spec for StringIO: method gets accepts string as separator
---
spec/ruby/library/stringio/gets_spec.rb | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/spec/ruby/library/stringio/gets_spec.rb b/spec/ruby/library/stringio/gets_spec.rb
From 4b95e77ae87ffe3878fd331c5aad51da9d6513ea Mon Sep 17 00:00:00 2001
From: Ivan Samsonov <[email protected]>
Date: Sun, 3 Oct 2010 16:51:33 +0400
Subject: [PATCH 1/2] Additional spec for Array#fill
---
spec/ruby/core/array/fill_spec.rb | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/spec/ruby/core/array/fill_spec.rb b/spec/ruby/core/array/fill_spec.rb
From 5d1905e0feff7f6a80e1194b52b81ba6b7fc6ba1 Mon Sep 17 00:00:00 2001
From: Ivan Samsonov <[email protected]>
Date: Wed, 29 Sep 2010 04:29:23 +0400
Subject: [PATCH 1/2] Add additional String#split spec using single space pattern
---
spec/ruby/core/string/split_spec.rb | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/spec/ruby/core/string/split_spec.rb b/spec/ruby/core/string/split_spec.rb
kronos:rubinius kronos$ git diff
diff --git a/lib/strscan.rb b/lib/strscan.rb
index 1d70184..4e3d9f4 100644
--- a/lib/strscan.rb
+++ b/lib/strscan.rb
@@ -124,7 +124,7 @@ class StringScanner
end
def pre_match
- string[0...(pos - match.to_s.size)] if matched?
diff --git a/Rakefile b/Rakefile
index b94e4c3..d050191 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,6 +1,7 @@
+
require 'rubygems'
require 'rake'
-require 'lib/resque/status'
+require File.expand_path '.', 'lib/resque/status' # since ruby 1.9.2 $: doesn't include '.'
From 9c6004b95f5a07bd35ba5b104b4fefc103d3d525 Mon Sep 17 00:00:00 2001
From: Ivan Samsonov <[email protected]>
Date: Tue, 10 Aug 2010 17:50:12 +0400
Subject: [PATCH] Fix compability with new resque
---
lib/redisk.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/redisk.rb b/lib/redisk.rb
a = >some_action (doesnt_matter_what);
fmt_spec = a b c;
<%= form_for @script do |f| %>
123
<%= f.fields_for :user_agents do |ff| %>
<%= raise 'x' %>
<% end %>
<% end %>