Skip to content

Instantly share code, notes, and snippets.

Avatar

Yusuke Endoh mame

View GitHub Profile
View cov.rb
require "coverage.so"
Coverage.start
at_exit { p Coverage.result }
View gist:299989
1)
Ruby character strings interpolates the return value of Object#inspect, without ivars, if Object#to_s does not return a String instance ERROR
ArgumentError: wrong number of arguments(2 for 1)
/home/mame/work/ruby/spec/rubyspec/language/string_spec.rb:158:in `[]'
/home/mame/work/ruby/spec/rubyspec/language/string_spec.rb:158:in `block (2 levels) in <top (required)>'
/home/mame/work/ruby/spec/rubyspec/language/string_spec.rb:5:in `<top (required)>'
2)
Array#concat raises a RuntimeError when Array is frozen and no modification occurs FAILED
Expected RuntimeError but no exception was raised
View gist:300491
rubyspec status on trunk (2010-02-10)
##### waiting for Yugui's commit [ruby-dev:40252]
1)
Ruby character strings interpolates the return value of Object#inspect, without ivars, if Object#to_s does not return a String instance ERROR
ArgumentError: wrong number of arguments(2 for 1)
/home/mame/work/ruby/spec/rubyspec/language/string_spec.rb:158:in `[]'
/home/mame/work/ruby/spec/rubyspec/language/string_spec.rb:158:in `block (2 levels) in <top (required)>'
View gist:301491
rubyspec status on trunk (2010-02-11)
##### narse said (on IRC) this is a wrong spec (EUC-JP is correct result). I'll fix after narse's approval
1)
File#to_path does not preserve the encoding of the path FAILED
Expected #<Encoding:EUC-JP>
to equal #<Encoding:UTF-8>
View gist:305689
diff --git a/core/time/plus_spec.rb b/core/time/plus_spec.rb
index 712c035..1b5d179 100644
--- a/core/time/plus_spec.rb
+++ b/core/time/plus_spec.rb
@@ -10,12 +10,6 @@ describe "Time#+" do
(Time.at(1.1) + 0.9).should == Time.at(0.9) + 1.1
end
- it "understands negative additions" do
- t = Time.at(100) + -1.3
View gist:323677
require "tempfile"
i = 0
loop { p Tempfile.new("foo#{ i += 1 }bar") }
View fakecoin.als
// 失敗版
sig Coin {}
abstract sig State {
  candidates : set Coin,
}
sig Branch extends State {
  left, right : set Coin, 
  eq, lt, gt : State
@mame
mame / t.c
Created Aug 22, 2011
Is it able to eliminate the tail call bar() ?
View t.c
int *p;
void foo(int *n) {
p = n;
}
void bar() {
print("%d\n", *p);
}
@mame
mame / gist:2510170
Created Apr 27, 2012
A Ranking of the "Procrastinating" committers of Ruby (2012/04/27)
View gist:2510170
A Ranking of the "Procrastinating" committers of Ruby (2012/04/27)
(or, how many tickets does each committer have?)
1: matz (126 tickets)
2: nobu (62 tickets)
3: ko1 (53 tickets)
4: akr (29 tickets)
5: mrkn (25 tickets)
6: nahi (18 tickets)
7: MartinBosslet (16 tickets)
View gist:2584253
diff --git a/ruviedit/OutlineBar.cpp b/ruviedit/OutlineBar.cpp
index db40aee..d8d263e 100644
--- a/ruviedit/OutlineBar.cpp
+++ b/ruviedit/OutlineBar.cpp
@@ -236,7 +236,8 @@ QTreeWidgetItem *OutlineBar::itemByDir(const QString &fullPath)
void OutlineBar::doParse(EditView *view, QTreeWidgetItem *item)
{
QList<OutlineItem> oi;
- OutlineTokenizer tn(view->document()->begin());
+ QTextBlock tb = view->document()->begin();