Is there an example of a scheme $X$ and $f\in \Gamma(X,\mathcal{O}_X)$ such that the map
$$\Gamma(X,\mathcal{O}_X)_f\rightarrow \mathcal{O}_X(X_f)$$ is not injective ?
Hartshorne II 2.16 b) states its injective under the assumption of quasi-compactness.
Notation:$X_f=\{x\in X|f_x\not \in \mathfrak{m}_x\}$.