huch ok you are right
this is a part of the code i currently use in my binding
VALUE _loadFile(int argc,VALUE *argv,VALUE self)
{
sf::Shader *image = new sf::Shader;
VALUE vert,frag;
rb_scan_args(argc, argv, "11",&vert,&frag);
if(!NIL_P(frag))
{
if(image->loadFromFile(unwrap<std::string>(vert),unwrap<std::string>(frag)))
return wrap(image);
}else if(rb_obj_is_kind_of(vert,rb_cHash))
{
VALUE temp;
if(!NIL_P(temp = rb_hash_aref(vert,ID2SYM(rb_intern("vert")))))
if(!image->loadFromFile(unwrap<std::string>(temp),sf::Shader::Vertex))
return Qnil;
if(!NIL_P(temp = rb_hash_aref(vert,ID2SYM(rb_intern("frag")))))
if(!image->loadFromFile(unwrap<std::string>(temp),sf::Shader::Fragment))
return Qnil;
return wrap(image);
}
return Qnil;
}
so it seems that the second part does not work if you use an Hash with both "vert" and "frag" keys ...
imo its a little bad but i think i can write around of that :/